2 Replies Latest reply on Jul 23, 2010 3:05 PM by AztecTechnologies

    Display Multistate Window

    AztecTechnologies

      Hi,

       


      When you select a symbol on the processbook display and then clilck on the MultiState symbol on the toolbar, the multistate window pops up and we can edit the properties of multistate by assigning a tag.

       


      Is there any way we can pop up this window programatically. Say I know the name of a symbol ( say Text1 )  from VBA. How will you bring up the pop up?

       


      More difficult will be bringing the pop up when Text1 is a part of a Composite.

       


      Eventhough multistates of Text1 could be changed in VBA , I want to get a pop up.

       

       

       

      Please reply

       


      Thanks

       

      Joe

        • Re: Display Multistate Window

          Hi Joseph,

           

          Just execute the MultiState control on the Formatting toolbar...example:

          
          

          ThisDisplay.Application.RunMode = False

          ThisDisplay.SelectedSymbols.RemoveAll

          SymbolName.Selected = True

          Dim cb As PBCommandBar
          Set cb = ThisDisplay.Application.CommandBars("Formatting Toolbar")
              Dim c As PBCommandBarControl
              Set c = cb.FindControl(, 32957)
                  c.Execute

           

          For a composite, you need to check the Parent property of your symbol, if part of a composite then handle accordingly.

            • Re: Display Multistate Window
              AztecTechnologies

              Rhys

               

              Thanks for the reply. My goal was to get multistate window of a symbol which is part of a composite. If we do it manually, then we've to ungroup the composite and dig until you get that symbol. I think in ProcessBook its not possible to get multistate window for that kind of symbol as that symbol can't be selected.

               

              I had a composite with different symbols. The following code didn't pop up the multistate window.

              Sub GetMultistatewindow()
                  Dim sim As Symbol
                  Dim cb As PBCommandBar
                  Dim c As PBCommandBarControl
                  Dim comp As Composite
                  Dim sym As Symbol

                  ThisDisplay.Application.RunMode = False
                  ThisDisplay.SelectedSymbols.RemoveAll

                  For Each sim In ThisDisplay.Symbols
                      If sim.Type = 0 Then
                          Set comp = sim
                          For Each sym In comp.GroupedSymbols
                              sym.Selected = True
                              Set cb = ThisDisplay.Application.CommandBars("Formatting Toolbar")

                              Set c = cb.FindControl(, 32957)
                              c.Execute
                          Next
                      End If
                  Next
              End Sub