CADability dotNET

This provides you with the fastest way to use CADability with Microsoft Visual Studio

Getting started

Additional tips

To see all of the loaded model or drawing on the display area use the ZoomToModelExtent method.

CopyC#
cadControl1.ShowFile(filename, "dxf");
ModelView mv = cadControl1.Frame.ActiveView as ModelView;
mv.ZoomToModelExtent(cadControl1.ClientRectangle, 1.0);

To gain access to the Model which is contained in the open project use:

CopyC#
Project pr = cadControl1.Frame.Project;
Model m = pr.GetActiveModel();
use the following lines to iterate all geometric entities in the model.
CopyC#
foreach (IGeoObject go in m)
{
    // do something with go
}