How i can call in c# the function Join Curves?I have selected and created a selection range of shapes.
One way
public void JoinCurves(ShapeRange shapesToJoin){try{Curve first = null;for (int i = 1; i <= shapesToJoin.Count; i++){if (!shapesToJoin[i].Type.Equals(cdrShapeType.cdrCurveShape))continue;if (first == null)first = shapesToJoin[i].Curve;elsefirst.AppendCurve(shapesToJoin[i].Curve);}}catch(Exception e){MessageBox.Show(e.Message);}
I will normally do something like this.I do the smallest gaps first then work up to the big ones, this gives better results for the type of shapes I am closing.
corelApp.ActiveSelection.CustomCommand("ConvertTo", "JoinCurves", 0.01); corelApp.ActiveSelection.CustomCommand("ConvertTo", "JoinCurves", 0.1); corelApp.ActiveSelection.CustomCommand("ConvertTo", "JoinCurves", 1);
Happy Coding,
-Shelby
Very interesting, how your secret to digging this stuffs? unfortunate is a string based param, in API documentation dont has a command table for it.
community.coreldraw.com/.../shaperange.customcommand
I guess some members here have the knowledge of Yoda ;-)
starting understanding now
How to use CustomCommand ? - OberonPlace.com Forums
Yep, most of the "secret" stuff which really wasn't ever secret just not well documented can be found on OberonPlace, it is still a wonderful resource.
Many Thanks.Maybe you know a custom command for "dplS.ApplyEffectInvert();"This function don't works on corel 2022 again.
ApplyEffectInvert works for in in 2022 Update 1
I use Version 24.1.0.360 from MarchSo i use this code origImg = corelApp.ActiveSelection.Shapes.All().FirstShape; origImg.ApplyEffectInvert();In Version 2021 and earlier it works, but on 2022 not.What i do it wrong?
Ah, I see, it it working for shapes, but it is not working for bitmaps. I will get his logged.
Many thanks Shelby