Add Our own Entities in Control
Moderators: SDS, support, admin
Add Our own Entities in Control
We want to display the floor plan, And in the run time user can add his/her own entities by dropping some object on the floor plan. The Entity should appear on the same point as it was dropped. I tries to use cadeditor control. But I am not able to get how can I draw my own object(Object can be triangle, circle or polygon) on the drawing. Pl
Re: Add Our own Entities in Control
Hello.
CADEditorControl functionality can be used to create some entities visually, by mouse. Another way is addind your own entities created and customized programmatically. The following is the example of creating CADCircle object at specified point:here CADImport.CADImage cadImage, CADImport.FaceModule.CADPictureBox cadPictBox are the fields of the form. You can paste this code to CADPictBox_MouseDown event in Viewer demo and set
Alexander.
CADEditorControl functionality can be used to create some entities visually, by mouse. Another way is addind your own entities created and customized programmatically. The following is the example of creating CADCircle object at specified point:
Code: Select all
if (this.cadImage == null)
{
this.cadImage = new CADImage();
this.cadImage.InitialNewImage();
}
this.cadImage.UseDoubleBuffering = false;
CADCircle ent = new CADCircle();
ent.Point = //here you can specify the insertion point
ent.Radius = 50;
ent.Color = Color.Red;
ent.Loaded(this.cadImage.Converter);
this.cadImage.Converter.OnCreate(ent);
this.cadImage.CurrentLayout.AddEntity(ent);
this.cadPictBox.Invalidate();
Code: Select all
ent.Point = this.GetRealPoint(e.X, e.Y);
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: Add Our own Entities in Control
Thanks
I have one question can we add tool tip to the cad circle object
I have one question can we add tool tip to the cad circle object
Re: Add Our own Entities in Control
Hello.
CAD Import .NET entities specification based on DWG/DXF entities specification. There is no such entity property or method. However you can realize Tooltip functionality in your own application.
Alexander.
CAD Import .NET entities specification based on DWG/DXF entities specification. There is no such entity property or method. However you can realize Tooltip functionality in your own application.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support