![]() |
| CAD, CAM, CAE, design, technical drawing, drafting, delineation, visualization, manufacturing | ISSN 1442-2255 |
|
|
CADSoftTools announces CAD Import .NETAutoCAD DWG and DXF formats in C# source code
Tula, Russia, 25 May 2006 -- Recently released by Soft Gold Ltd a CAD Import.NET library brought a wide set of opportunities to AutoCAD users and software developers programming in the .NET environment. This product basically consists of two parts: Viewer and Import libraries. Viewer library The Viewer library provides functionality for viewing CAD files, Windows metafiles and raster images. The supported formats include DWG, DXF, WFM, EMF, BMP, JPG, TIFF, GIF, and ICO. The program allows converting CAD files to Windows metafiles and raster images. Raster images can be printed, zoomed in, zoomed out and rotated in their planes. For CAD images the program provides a wider scope. They also can be printed, zoomed in and zoomed out. Rotation for them is possible around each of three space axes. Each layer of the CAD image can be switched off or switched on. Different layouts can be selected in the corresponding combo box. A visibility of all entities contained in the CAD file can be switched off or switched on. The program also allows turning on or turning off SHX fonts. Other features include:
Another remarkable feature of the CADImport.NET library is CADImportControl component. This control makes possible inserting the whole CAD viewer to any Windows form. To use CADImportControl create a new Windows application. Add respective name spaces in the project: // code example: using CADImport; using CADImportControl; Add three lines of code to the constructor of the main application's form: // code example: CADImportControl.CADImportControl importControl = new CADImportControl.CADImportControl(); importControl.Size = new Size( this .ClientRectangle.Width, this .ClientRectangle.Height); this .Controls.Add(importControl); Run the application and you will receive a completely functional AutoCAD viewer on your form. Import library The Import library besides the features of the first library also provides a full access to all entities read from a CAD file. This feature allows a programmer to modify the properties of each entity loaded from a CAD file by code. All entities from a CAD file also can be imported to the application and saved in the following text format: ClassName = CADImport.CADLINE; Entity name = LINE layer = 0 style = psSolid color = ffff00ff Begin point: X=314,02877557061 Y=260,650719629539 Z=0 End point: X=347,350258688998 Y=227,50439611107 Z=0 ClassName = CADImport.CADLINE; Entity name = LINE layer = 0 style = psSolid color = ffff00ff Begin point: X=402,649741311002 Y=172,49560388893 Z=0 End point: X=412,575289473926 Y=162,622230925982 Z=0 ClassName = CADImport.CADTEXT; Entity name = TEXT layer = 0 style = psSolid color = ffff00ff Start point of Text: X=463,963052226108 Y=189,239334106445 Z=0 The text is: 900 Angle=090 All basic entity properties are represented here. For the line these are name, layer, style, color, beginning point, end point. For the text entity its contents is also included as a property. As an example of modifying the entity's property let us consider changing Text property of the CADMText entity. The code below is added to the end of the LoadFile(bool dlg) method of the main application's form. It changes the texts of all dimensions whose text values equal " 300" to " 300 mm ". Other properties of all other CAD entities can be modified this way. Access to each entity is possible through the collection of entities FCADImage.Converter.Entities. This collection belongs to the CAD converter which can be accessed through the Converter property of any CAD image. // code example: foreach(CADEntity entity in FCADImage.Converter.Entities) { if(entity is CADDimension) { foreach(CADEntity ent in ((CADDimension)entity).Block.Entities) { if(ent is CADMText) { if(((CADMText)ent).Text == "300") { ((CADMText)ent).Text = "300 mm"; FCADImage.Converter.Loads((CADMText)ent); } } } } } Availability and Pricing CAD Import .NET runs under Windows 98/Me/NT 4/2000/XP/2003 Server with .NET Framework installed and costs $49 (USD) for a single-user license. Discounts for volume buyers are available. A fully functional evaluation version of the program can be downloaded for free at http://www.cadsofttools.com/download/cadimportnet.zip (2.5 Mb). About Soft Gold Soft Gold Ltd is an information technology company based in Tula , Russia . The company was founded in 2000 by software engineer Dmitry Sidorkin. We specialize in CAD software development and consulting. Our company is successfully marketing products for reading DXF, DWG, HPGL, SVG and CGM worldwide and has become the world's leader in AutoCAD libraries for .NET and Delphi environments. Currently, our team is involved into the development of the next generation CAD software.
|