Would you recommend ABViewer to your co-workers or friends?
 


 

Subscriber

News






CAD Import VCL Eメール
There are no translations available.

                  CAD Import VCL 7                      
 

CAD Import VCL

CAD Import VCL is a high-quality multi-functional source code provided component for using in Delphi/C++Builder applications. Support of more than 30 both raster and vector formats is provided, including AutoCAD™ DWG/DXF, Autodesk® DWF, Hewlett-Packard® HPGL, PLT, HGL, CGM, SVG, TIFF, BMP, JPG, GIF etc.

 
 
 
  • Description
  • Features
  • Code examples
  • Send a question
  • SDK compatibility

Boost the functionality of your CAD application with CAD Import VCL. CAD Import VCL makes it extremely easy to work with CAD and other graphic file formats in Delphi and C++Builder. Display more than 30 both raster and vector formats, including AutoCAD™ DWG/DXF, Autodesk® DWF, Hewlett-Packard® HPGL/HGL/HPGL2, PLT, CGM, SVG, TIFF, BMP, JPG, GIF. Easy access to the properties of DWG/DXF entities (see here for a complete list) and export to BMP, EMF, JPEG, TIFF, GIF formats are also supported.

Below is a list of CAD Import VCL main features:

  • Import of AutoCAD® Drawing (DWG) files
  • Import of AutoCAD® Drawing Exchange Format (DXF) files
  • Import of Autodesk® Design Web Format (DWF) files
  • Import of Hewlett-Packard® Graphic Language files (HPGL/HGL/HPGL2)
  • Import of Computer Graphics Metafile (CGM) and Scalable Vector Graphics File (SVG) formats
  • Export to BMP, JPEG, GIF, TIFF, WMF, EMF
  • Easy drawing via TsgDrawingNavigator or standard classes (TImage, TCanvas)
  • Access to the properties of DWG/DXF entities
  • Source code provided
  • Compatible with Delphi (from 5 up to XE3 versions) and C++Builder
  • Supports 64-bit platforms
  • Supports Unicode

CAD Import VCL features

CAD Import VCL provides an API for using AutoCADTM DXF/DWG, SVG, CGM and Hewlett-Packard HPGL/HPGL2 file entities in your application. The TsgDXFConverter is the base class of the CAD Import VCL. It provides the list of the TsgDXFEntity class based entities which are loaded from DXF/DWG/HPGL/HPGL2/SVG/CGM file. "SimpleImport" demo shows access to extensive properties of each CAD entity.

You can use AutoCAD drawings in your application, preview and convert them to your file format. TsgDXFConverter is a representation of CAD files in the memory and consists of standard TABLES, BLOCKS and ENTITIES sections each of which has a list of visual entities (BLOCKS, ENTITIES) or (TABLES).

Also, CAD Import VCL provides a tool for Delphi and C++Builder developers, which allows to work with AutoDesk AutoCADTM DWG/DXF, Hewlett-Packard HPGL/HPGL2, SVG and CGM file formats by using TGraphic interface. CAD files can be displayed, printed, saved to BMP, EMF, JPEG and other formats.

  • CAD extentions: *.dwg; *.dxf; *.plt; *.hgl; *.hg; *.hpg; *.plo; *.hp; *.hp1; *.hp2; *.hpgl; *.hpgl2; *.gl2; *.prn; *.spl
  • Capability to add the following extentions: *.tif; *.tiff; *.fax; *.bw; *.rgb; *.rgba; *.sgi; *.cel; *.pic; *.tga; *.vst; *.icb; *.vda; *.win; *.pcd; *.ppm; *.pgm; *.pbm; *.cut; *.pal; *.rla; *.rpf; *.psd; *.pdd; *.psp; *.png; *.rle; *.dib; *.ico; *.emf; *.wmf; *.jpg; *.jpeg; *.gif; *.pcx; *.bmp
  • Access to extensive properties of each CAD entity that is supported by CAD Import VCL
  • Easy drawing via TsgDrawingNavigator or standard classes (TImage, TCanvas)
  • Full control of every layer and any element of it
  • Three-dimensional coordinates support
  • High speed for reading all formats
  • Quick and exact reading of DXF/DWG/HPGL/SVG/CGM files and manipulating them using TGraphic interface
  • DWG and DXF layouts
  • DWG and DXF ACIS entities
  • DXF Autocad Table
  • DWG and DXF reference images
  • HPGL RTL images
  • DWG and DXF Hatch gradients
  • Fast Report VCL and Report Builder compatible
  • 3D support including nested extrusions
  • Easy and smart scaling and image dragging
  • Compatible with AutoCAD® DXF format
  • Compatible with AutoCAD® DWG format
  • AutoCAD® PROXY (including AEC) entities are supported
  • Compatible with Delphi (from 5 up to XE3 versions) and C++Builder
  • All ANSI-codepages are supported
  • Unicode support. Enhanced Unicode symbols (\M+) for TTF fonts are supported
  • Royalty-free licensing
  • 1 year of free upgrades and support

CAD Import VCL provides CAD developer with easy-in-use API that allows building your application from scratch. The examples below demonstrate how to implement the most common functionality using CAD Import VCL.

Viewing CAD and various graphic files

CAD Import VCL package contains TsgDrawingNavigator component that intended for displaying files of various graphic formats.

TsgDrawingNavigator allows:

  • loading files
  • scaling by mouse wheel
  • panning by middle or right mouse button
  • panning by scroll bars
  • fitting image within visible part of the control
  • stretching image within visible part of the control
  • snap
  • display necessary point
  • changing background color
  • 3D viewing

 

For reading CAD files into memory the descendants of TsgCADImage class are used. TsgCADImage is a descendant of TGraphic class; therefore, it can be drawn onto TsgDrawingNavigator or any other visual component (TImage, for example).

The code example below demonstrates the implementation of simple CAD viewer. It uses TsgDrawingNavigator and TTabControl for displaying layouts.

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, 
  ExtDlgs, Menus, ComCtrls, Grids, CADImage, DXFConv, DXF, DWG, DWF, HPGL2, CGM, SVG, 
  sgConsts, sgDrawingNavigator;

type
  TForm1 = class(TForm)
    OpenPictureDialog1: TOpenPictureDialog;
    MainMenu1: TMainMenu;
    miFile: TMenuItem;
    miOpen: TMenuItem;
    miClose: TMenuItem;
    tcLayouts: TTabControl;
    procedure miOpenClick(Sender: TObject);
    procedure tcLayoutsChange(Sender: TObject);
    procedure miCloseClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    FDNavigator: TsgDrawingNavigator;
    procedure LoadDrawing;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  Img: TsgCADImage

implementation

{$R *.dfm}


procedure TForm1.FormCreate(Sender: TObject);
begin
  // Set an owner for TsgDrawingNavigator object when creating it
  FDNavigator := TsgDrawingNavigator.Create(tcLayouts);
  // Set the properties for TsgDrawingNavigator object
  FDNavigator.Parent := tcLayouts;
  FDNavigator.AutoFocus := True;
  FDNavigator.Align := alClient;
end;


procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  FDNavigator.Free;
end;

procedure TForm1.miCloseClick(Sender: TObject);
begin
  Img := nil;
  FDNavigator.Picture.Graphic := nil;
  tcLayouts.Tabs.Clear;
end;


procedure TForm1.LoadDrawing;
const
  Exts: array[0..17] of string = ( '.dxf', '.dwg', '.plt', '.hgl', '.rtl',
    '.hg', '.plo', '.hp', '.hp1', '.hp2', '.hpg', '.hpgl', '.hpgl2', '.gl2',
    '.prn', '.spl', '.svg', '.cgm');
var
  vFileExt: string;

  procedure ViewLayouts;
  var
    I: Integer;
  begin
    for I := 0 to Img.LayoutsCount - 1 do
      tcLayouts.Tabs.Add(Img.Layouts[I].Name);
    // Assign TsgCADImage object to TsgDrawingNavigator
    FDNavigator.Picture.Assign(Img);
    // Set the current layout for TsgCADImage object
    Img.CurrentLayout := Img.Layouts[0];
  end;

begin
  vFileExt := ExtractFileExt(LowerCase(OpenPictureDialog1.FileName));
  // Create an instance of TsgCADImage descendant depending on file extension
  case StrIndex(vFileExt, Exts) of
    0:    Img := TsgCADdxfImage.Create;
    1:    Img := TsgDWGImage.Create;
    2..15:    Img := TsgHPGLImage.Create;
    16:     Img := TsgSVGImage.Create;
    17:     Img := TsgCGMImage.Create;
  end;
  if Img <> nil then
  begin
    // Load drawing from file to TsgCADImage object
    Img.LoadFromFile(OpenPictureDialog1.FileName);
    ViewLayouts;
  end;
end;


procedure TForm1.miOpenClick(Sender: TObject);
begin
  FDNavigator.Picture.Graphic := nil;
  OpenPictureDialog1.FileName := '';
  Img.Free;
  if not OpenPictureDialog1.Execute then
    Exit;
  FDNavigator.BeginUpdate;
  try
    LoadDrawing;
  finally
    FDNavigator.EndUpdate;
    FDNavigator.Update;
  end;
end;


procedure TForm1.tcLayoutsChange(Sender: TObject);
begin
  TsgCADImage(FDNavigator.Picture.Graphic).CurrentLayout := 
  TsgCADImage(FDNavigator.Picture.Graphic).Layouts[tcLayouts.TabIndex];
end;

To ask us any questions you have please do not hesitate to use our Contacts page.

For questions about licensing please write to This e-mail address is being protected from spambots. You need JavaScript enabled to view it .



Soft Gold Ltd. reserves the right to refuse granting a license without explanation of reasons.

This table describes CADSoftTools SDK compatibility

  .NET Win32 Java Access to entities View Export to DXF Editor
C# VB.NET J# VC++ VB Delphi/ C++ Builder
CAD Export .NET Yes Yes Yes No No No No Yes No Yes No
CAD Import .NET Yes Yes Yes No No No No Yes Yes Yes Yes
(professional version)
CADViewX Yes Yes Yes P Yes P No Yes Yes Yes Yes
(professional version)
CAD Image DLL P P P Yes P P No No Yes No No
CAD Importer DLL P P P Yes P P No Yes P No No
DXF Exporter DLL P P P Yes Yes P No No No Yes No
DXF Export Java No No No No No No Yes No No Yes No
CAD Import VCL No No No No No Yes No Yes Yes Yes* No
CAD Export VCL No No No No No Yes No No No Yes No

Yes - recommended
P - possible to use
* - works with CAD Export VCL

 

CAD Import VCL download download_but

 

 
 ©2001-2013 Soft Gold Ltd. All rights reserved.