How i can outlines in RGB(255,0,0) select on if statement?
In my example works the selection of 0.0762, but colors dont work.
1 2 3 4 5 6 7
foreach (corel.Shape sh in sr) { if ((sh.Outline.Width != 0.0762)&&(sh.Outline.Color != corelApp.Application.CreateRGBColor(255,0,0))) { sr.Remove(sr.IndexOf(sh)); } }
you cannot compare objects with Color-type this way. See methods of Color-class
in the meantime i tried a query. it works with the color selection. but not with the line thickness...sr = corelApp.ActiveSelection.Shapes.FindShapes(Query: "@outline.color = RGB(255, 0, 0)"); // find the color OK sr = corelApp.ActiveSelection.Shapes.FindShapes(Query: "@Outline.Width = 762"); // not works and gives a non-usable error message
Please, try it in the next way:
Set shR = ActiveSelection.Shapes.FindShapes(Query:="@outline.color = RGB(225, 0, 0) and @outline.width = {762 mm}") shR.CreateSelection
Please, use the unit of measure, as the above code shows. But, what are these used 762? Millimeters?
Many thanks! This works :-)
How did you use it for that unit of measure (I never used)? Like CQL or by conditional iteration?
you mean this?corelApp.ActiveDocument.StyleSheet.FindStyle("~graphic~").Outline.Width = corelApp.ActiveDocument.ToUnits(762, corel.cdrUnit.cdrTenthMicron);
So, not CQL... I do not know what abbreviation to be used for 'cdrTenthMicron' like unit of measure in CQL.
Ahh. OK i got this from Eskimo a long time ago in this forumcommunity.coreldraw.com/.../303672
I just had to find out what CQL is first. Google helps me ;-)Maybe you have a good documentation about CQL and corel?
No, I'm afraid such complete documentation does not exist... At least, it is not public. You cannot even search for it. I usually found some interesting approaches looking in Oberon forum and here. And experimenting by my own what I could imagine it may be working... I have the impression, maybe a wrong one, that Corel technical team does not share such documentation on purpose. It will be so easy do do it, with examples for each property, method. Only some people selling applications have/receive the information from them... Or some of them are the selling ones and company accepts this behavior.