uses DWG;
...
type
TForm1 = class(TForm)
Image1: TImage;
...
implementation
procedure TForm1.ReadDWGClick(Sender: TObject);
var
vDrawing: TsgDWGImage; //TsgDWGImage class is used for reading DWG.
//Please use a correspond class to read a drawing of other format.
//For example TsgCADdxfImage for DXF format, TsgSVGImage for SVG, etc.
begin
vDrawing := TsgDWGImage.Create;
vDrawing.LoadFromFile('Gasket.dwg');
Image1.Canvas.Draw(0, 0, vDrawing);
vDrawing.Free;
// zooming and panning the drawing is implemented in the demo Viewer
// via the special viewer control TsgDrawingNavigator
end;
Go to CAD VCL Enterprise