![]() |
#1
|
|||
|
|||
![]()
Hello~ It's a hotter than I remember.. wow
As you can see, How do I wonder about using a CQL on C#(4GL) If somebody who have solved a problem here, would you tell me a way to use a CQL Thks Best Regards... |
#2
|
||||
|
||||
![]()
Here is a simple example of how to use C# and CQL. I tested this example with VSTO and CorelDRAW X5. The example creates three rectangles then selects one of them using CQL.
Code:
Document doc = app.CreateDocument(); Shape sRectLarge = doc.ActiveLayer.CreateRectangle2(0, 0, 3, 3, 0, 0, 0, 0); Shape sRectMedium = doc.ActiveLayer.CreateRectangle2(4, 0, 1, 1, 0, 0, 0, 0); Shape sRectSmall = doc.ActiveLayer.CreateRectangle2(6, 0, .5, .5, 0, 0, 0, 0); sRectLarge.Fill.UniformColor.CMYKAssign(0, 100, 100, 0); sRectMedium.Fill.UniformColor.CMYKAssign(0, 100, 100, 0); sRectSmall.Fill.UniformColor.CMYKAssign(0, 100, 100, 0); ShapeRange srFoundShapes = doc.ActivePage.Shapes.FindShapes(null, cdrShapeType.cdrNoShape, true, "@width = {1 in} and @fill.color = cmyk(0,100,100,0)"); srFoundShapes.CreateSelection(); -Shelby |
#3
|
|||
|
|||
![]() Code:
// Shape Error Check if (corel.ActiveDocument.ActivePage.Shapes.FindShapes(string.Empty, cdrShapeType.cdrNoShape, true, "@type='3DObject' or @type='ArtisticMediaGroup' or @type=BevelGroup or @type=BlendGroup or @type=Connector or @type=ContourGroup or @type=CustomEffectGroup or @type=CustomEffectGroup or @type=DropShadowGroup or @type=ExtrudeGroup or @type=HTMLActiveObject or @type=HTMLFormObject or @type=LinearDimension or @type=MeshFill or @type=OLEObject or @type=Perfect or @type=Symbol or @type=text").Count != 0) { throw new Exception(); } if (corel.ActiveDocument.ActivePage.Shapes.FindShapes(string.Empty, cdrShapeType.cdrNoShape, true, "@color.IsCMYK = false").Count != 0) { throw new Exception(); } Top of the page has a type check and color check using a CQL, but I don't know what Effect Check As you can see, CorelDraw have a lot of many type object.. so I would like to know how to find a lot of many object information using a CQL For example. CQL Manual Returns an array of colors used in the fill and the outline of the shape. This array contains only unique colors, so if both the fill and the outline have the same color, only one color will be returned @colors.find(cmyk(0,0,0,100)) => finds if the shape contains a CMYK black color !@color.filter($item.cmyk.k <> 0).empty => Finds if the shape has any color that has non-empty black color component. if (sh.Shapes.FindShapes(string.Empty, cdrShapeType.cdrNoShape, true, "@color.cmyk.k <> 0 and @fill.Type = 'uniform'").Count > 0) { color = 1; } if (sh.Shapes.FindShapes(string.Empty, cdrShapeType.cdrNoShape, true, "(@color.cmyk.c + @color.cmyk.m + and @color.cmyk.y + @color.cmyk.k = 0) or (@color.cmyk.c + @color.cmyk.m + and @color.cmyk.y) and @fill.Type = 'uniform'").Count > 0) { color = 4; } Thank For you Replay again Last edited by ljesus7; 26-08-2010 at 06:20. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to detect textbox's language or charset? | litthe | CorelDRAW/Corel DESIGNER VBA | 1 | 24-03-2009 19:52 |
Add the Language | mariz777 | Calendar Wizard | 0 | 25-11-2007 02:51 |
Lost Language | duinker | Calendar Wizard | 2 | 12-11-2004 09:13 |
problems with dates when language is set to French Canadian | shelley | Calendar Wizard | 1 | 19-10-2004 07:17 |