Library, controls, methods and their description

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Khyati
Posts: 34
Joined: 08 Feb 2011, 08:55

Library, controls, methods and their description

Post by Khyati » 09 Feb 2011, 08:54

What is definition of method cadEditorControl1.DrawCADImage?
When i write following code:

gr := new CADImport.CADEllipse;
cadEditorControl1.DrawCADImage(gr);

It gives error as: there is no overload method "DrawCADImage" with 1 parameter.
As per import help file, there is only one parameter.

There are many other methods / classes, whose information is not available, e.g. "CreateControl" method of CADEditorcontrol.

Is there more eloborated help file available?

Which controls/library should i include for which controls? Where is it mentioned?

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Library, controls, methods and their description

Post by support » 09 Feb 2011, 14:11

Hello.
CADEditorControl.DrawCADImage method draws image to a Graphics class object. Moreover, you don't need call this method from your application, just invalidate the control. I post the simple code to create and visualize ellipse with CADEditorControl object. You can test it with our demo source project.

Code: Select all

            if (this.cadEditorControl.Image == null)
            {
                this.cadEditorControl.CreateNewImage();
                this.cadEditorControl.Image.InitialNewImage();
            }

            CADImport.CADEllipse entEllipse = new CADImport.CADEllipse();
            entEllipse.Point = new CADImport.DPoint(100, 100, 0);
            entEllipse.Radius = 50;
            entEllipse.Ratio = 0.7;
            entEllipse.RadPt = new CADImport.DPoint(120, 200, 0);
            entEllipse.Color = Color.Aqua;

            entEllipse.Loaded(this.cadEditorControl.Image.Converter);
            this.cadEditorControl.Image.Converter.OnCreate(entEllipse);
            this.cadEditorControl.Image.CurrentLayout.AddEntity(entEllipse);

            this.cadEditorControl.Invalidate();
We strongly recommend to learn CAD Import .NET library structure. Some basic points are:

1. CADImage object contains all entities information
2. CADImage.Converter contains all entities from currently displayed layout
3. CADImage.Layout.Entities provides access to entities from specific layout.

CADEditorControl provides the control that include inner CADImage object. Loaded file will be imported to CADEditorControl.Image structure. New entities can be added to this object too.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply