In the documentation cql is mentioned as query language for complex shape searching.
But all examples i find are for vba where it can be used in findshapes:
ActivePage.Shapes.FindShapes(Query:="@outline.type = 'none' and @fill.type = 'none'")but how do i use this in vsta (c#)?thanks in advanceTom
What did you try?
It should be something similar. This line should work:
1
corelApp.ActiveDocument.ActivePage.Shapes.FindShapes(null, corel.cdrShapeType.cdrNoShape, true, "@outline.type = 'none' and @fill.type = 'none'");
You can 'help' the function (if the case) using the shape name instead of 'null', the shape type for the second parameter...
I think this code should also work (even more similar). I cannot test it...
corelApp.ActiveDocument.ActivePage.Shapes.FindShapes(Query:"@outline.type = 'none' and @fill.type = 'none'");
Of course, you must allocate the function result to a ShapeRange variable...
In fact, when you open the function parenthesis VS will show you which to be the accepted options for the parameters.
visual studio indeed gives a tooltip of the function but it only has 3 parameters name type and recursive so the first example does not work, i thought at least.
But apparently the function activePage.findShapes has 3 arguments but the function activePage.Shape.findShapes has four.
how bizar, so thank you for pointing this out, it compiles now.