Friday, 29 July 2011

Skeeper - keep you selection (little macro)

In this post I would like to demonstrate a little macro which allows you to remember certain group of shapes without grouping them.


SKeeper creates groups of shapes/objects (not grouped shapes in CorelDraw meaning).
It put a registry to shape's name attribute (you can see it in Object Manager), when you click on the list with groups names it finds all shapes with the same record and adds them to selection.

Registry/records looks like this :    SK:groupName
where groupName will appear in the SKeeper list box

You can put anything in the object's name property, just keep SKeeper record at the end.

The limit is that the groups cannot overlap, in other words object can belong to only one group,
therefore if you try to assign object to group-2 which is already assigned to group-1 the first record will be replaced by second.

There is one thing I'd like to say about code, in this macro I use CQL (Corel Query Language) to search for shapes.
for example:
ActiveDocument.SelectableShapes.FindShapes(, , , "@name.Contains('SK:')")
 first 3 parameters are omitted (notice empty spaces between commas) and last parameter is a String type variable (notice quotes) and it represent the CQL syntax (very powerful tool).
See this article for more details:
Using CQL

Feel free to use this macro (in your company or home), look at the code if you like, leave comment, ask a question.

Gms file to download:

You might be interested in more featured  similar macro, see:

1 comment:

  1. Published its Macro Blog, as authorized by email. I am grateful. So you give will be publishing another. power Duplicate

    I hope you enjoy the post.