I am trying to figure out how to find if there are any spot colors in the CDR file using CQL
I am able to find Fountains by during thisActivePage.Shapes.FindShapes(Query:="@fill.type = 'fountain'")
But how do I write the query to see if there are any spot colors, pantones, cmyk, rgb, lab, etc.So tried this and it does not workActivePage.Shapes.FindShapes(Query:="@colors.find('cmyk')")Any ideas?
Thanks ,
Tom
Shelby Moore said:What's the shortcut or most direct route?
Are you looking for a color and all the objects that are filled and or filled and outlined?
Thanks Shelby. These are working great.Here is something I am trying to do, but it is failing inside the IF statement. I can get the LensEffect, but I am trying to get the name (ie FishEye, etc.). I even tried to do a compare in the query and that didn't work.
Dim effectsLensShapes As ShapeRange
Set effectsLensShapes = ActivePage.Shapes.FindShapes(Query:="!@com.Effects.LensEffect.IsNull")If (effectsLensShapes.Count > 0) Then
Set effectsLensTypes = ActivePage.Shapes.FindShapes(Query:="@com.Effects.LensEffect.Lens.Type = 'cdrLensFishEye'")
End If
Any help would be great and appreciated.
Thanks
Tom,
Depending on what you are doing you really shouldn't need the If Then, CQL will find just the specific Lens Type. But again, that depends on your end goal. :-) Second, if I was using the If I wouldn't search the entire page again I would only search your already found ShapeRange. :-) Finally, instead of using cdrLensFishEye you need just just use the number. So cdrLensFishEye is equal to 1. I will include the list.
Sub Lenses() Dim effectsLensShapes As ShapeRange Dim effectsLensTypes As ShapeRange Set effectsLensShapes = ActivePage.Shapes.FindShapes(Query:="!@com.Effects.LensEffect.IsNull") If (effectsLensShapes.Count > 0) Then Set effectsLensTypes = effectsLensShapes.Shapes.FindShapes(Query:="@com.Effects.LensEffect.Lens.Type = 1") End If End Sub
Here are the number values:
Hope that helps,
-Shelby
Shelby,
GREAT!!!!
The list was perfect.
I have 2 other requests that can up in our designer meeting. Can these also be done in CQL?
1) Check for Powerclips and then get the shapes that are in a Powerclip.
2) The other is to check the nodes of a shapes to see if they are over 10,000 nodes or more.
Thanks,
Hello,
you want it probably with VBA it self create?
This macro could do it probably also
http://macros.cdrpro.ru/cdrpreflight