AnsweredAssumed Answered

How to programaticaly loop through the button.action for all buttons in a ProcessBook display

Question asked by pienaac on Sep 2, 2015
Latest reply on Sep 14, 2015 by pienaac



I am trying to loop through all the buttons in a ProcessBook display and return the action property value. I have started with the code below.


Private Sub LoopButtonAction()

    Dim mySymbol As Symbol

    Dim mySymbolName As String

    Dim myButtonDef As ButtonDefinition


    For Each mySymbol In Symbols

        If mySymbol.Type = 9 Then

            mySymbolName = mySymbol.Name

            Set myButtonDef = mySymbolName.GetDefinition()

            MsgBox (myButtonDef.Action)

        End If


End Sub


I am able to loop through all the buttons in the specific display by checking the symbol type = 9, but when I try to get the button definition by dynamically assigning the button name to mySymbolName and I try running "Set myButtonDef = mySymbolName.GetDefinition()", I get a compile error "Invalid qualifier". I am a bit of a noob programmer and this is most likely something stupid that I am doing. Can someone point me in the right direction.