Add Line or Arc to CADEditorControl
Moderators: SDS, support, admin
Add Line or Arc to CADEditorControl
How can I programmatically add a line or arc to a loaded drawing using the CADEditorControl?
Thanks,
Bob
Thanks,
Bob
Re: Add Line or Arc to CADEditorControl
Hello Bob,
Please look at the code examples below.
Mikhail
Please look at the code examples below.
Code: Select all
CADArc vArc = new CADArc();
vArc.StartAngle = 60;
vArc.EndAngle = 210;
vArc.Radius = 50;
vArc.Point = new DPoint(110, 160, 0);
vArc.Color = Color.Green;
cadEditorControl.Image.Converter.Loads(vArc);
cadEditorControl.Image.Layouts[0].AddEntity(vArc);
cadEditorControl.Refresh();
Code: Select all
CADLine vLine = new CADLine();
vLine.Point = new DPoint(80, 100, 0);
vLine.Point1 = new DPoint(150, 150, 0);
vLine.Color = Color.Blue;
cadEditorControl.Image.Converter.Loads(vLine);
cadEditorControl.Image.Layouts[0].AddEntity(vLine);
cadEditorControl.Refresh();
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support