1 Reply Latest reply on Feb 15, 2017 9:19 AM by Patrick.Cashman

    How to select all design components through automation

    vasanthitcs

      Hello All,

       

      How to select all design components through automation in dxdesigner. Can this be achieved.

       

      Thanks & Regards,

      Vasanthi

        • 1. Re: How to select all design components through automation
          Patrick.Cashman

          Declare public variables:

          Public scomps As Object

          Public design_name As String

           

          call this subroutine to load all components

          Sub load_design_comps()

                   design_name = app.GetProjectData.GetiCDBDesignRootBlock(app.GetActiveDesign())

                   scomps = nothing

                   scomps = app.DesignComponents("", design_name, "-1", , False)    'gets all the components in the design

          End Sub

           

          call this subroutine to iterate through each component and do something to it

          Sub do_something_on_each_component()

                   Dim scomp As ViewDraw.Component

                   For Each scomp In scomps

                       'do something on each component

                   Next

          End Sub