3 Replies Latest reply on Jan 2, 2018 7:09 AM by peter_festesen

    component selection status

    etib@rafael.co.il

      Hello,

      I search a way to get the component selection status. When my application loaded "component selection status" have to be loaded also.

      This solution have to be simple and not to go through all design pages, that is why query isn't applicable solution for me. Is there any way to get "component selection status" for my need?

       

      Thank's

      Ester

        • 1. Re: component selection status
          peter_festesen

          Ester - it is not clear to me what you are looking for...Do you want to detect if a component is selected and then perform an action with the selected component ?

           

          /Peter

          • 2. Re: component selection status
            etib@rafael.co.il

            Yes, it's exactly what i'm looking for.

            Do you know a simple way to extract this information about component?

             

            Thanks a lot

            Ester

            • 3. Re: component selection status
              peter_festesen

              In the DxDesigner Automation Manual, on page 142 (for VX.2.2), there is an example :

              Sub Application_Select(SelectionType, Block)

                   If SelectionType = VDSELECT_NOTIFY Then

                        For Each obj In ActiveView.Query(VDM_COMP, VD_SELECTED)

                             MsgBox obj.UID

                        Next

                   End If

              End Sub

               

              Whenever a component is selected, this Sub is called - you will have to use the Scripting.DontExit = True in your code (see pg 34 in the mentioned document) 

               

              So, to get started, this is all you need ;-)

               

               

              Option Explicit

              Scripting.Dontexit=True

              Dim Obj

              Sub Application_Select(SelectionType, Block)

                   If SelectionType = VDSELECT_NOTIFY Then

                        For Each obj In ActiveView.Query(VDM_COMP, VD_SELECTED)

                             MsgBox obj.UID

                        Next

                   End If

              End Sub