How do I move objects from all layers into selection?

I can select all objects in current layer with the following

                 ActiveLayer.Shapes.All.AddToSelection

but,  how do I loop through all layers and add their shapes to Selection?

Parents Reply
  • It is difficult to become a CQL expert, looking only to what you can find here. And something else (coming from Corel) I did not see, even if I would study it with a lot of joy... I have an Excel file with a dedicated page to CQL code examples. I created something just using my imagination and others coming from here, Oberon etc. mostly from Shelby.

    You must cultivate your imagination and just try. Looking to Intellisense suggestions and try.

    I did not imagine such a way. Now being inspired (by you) the code can be made even shorter:

    1
    ActivePage.Shapes.FindShapes(, , False, "@type != 'guide' and  @com.layer.isSpeciallayer = 'False'").CreateSelection
    

    IsSpecialLayer returns true in case of guideline, desktop, or grid layers... The guide shape must be checked because if you copy one and an ordinary layer is active, it is copied on this one after Paste. It happened to me many times especially when I tried to copy guide lines inclined with a specific angle.

Children