2 Replies Latest reply on Apr 5, 2013 8:05 AM by volker.hetzer

    DxDesigner automation: How to select all lines on a sheet?

    volker.hetzer

      Hi!

      I've got this code for this sheet:

      Clipboard01.jpg

      The sheet clearly contains lines. How can I select them all?

      (Update: If you click on the image, you get the enlarged version, where the code is readable.)

       

      Lots of Greetings!

      Volker

       

      Added hint for reading the VBScript code in the screenshot.

        • 1. Re: DxDesigner automation: How to select all lines on a sheet?
          john_dube

          Hi Volker,

           

          You will need to use ActiveView.Query(VDM_LINE, VD_ALL), loop over the results, and set the Selected property to True.

           

          Also, keep in mind that those lines may actually be arcs, since there was a bug for a while that made it difficult to add a line through automation, the workaround was to add an arc.

           

          If you need to select arcs as well, you can use ActiveView.Query(VDM_LINE + VDM_ARC, VD_ALL)

           

          John

          • 2. Re: DxDesigner automation: How to select all lines on a sheet?
            volker.hetzer

            Hi John!

            Sorry for the delay, we are at the end of a big piece of software.

             

            Yes, that is what we fell back to, after restructuring our app to draw fewer lines. The problem we have with this approach is that this occurs at the end of a large amount (thousands) of API calls and we are getting in the area where the API gets used up. Having to execute another thousand calls or not has consequences for the stability of our solution. This is why we tried to delete them using one call per sheet instead of one call per line.

             

            Lots of Greetings!

            Volker