CADEditorX is an ActiveX component for adding CAD features to the Web page or to the application under development in any development environment supporting ActiveX and COM technology, for example C#, Visual C++, Delphi, VB, JavaScript etc. It enables viewing, editing, converting, printing and measuring DWG, DXF, SVG, HPGL, PDF, STEP, IGES, STL and other CAD files. An easy-to-use API and numerous examples allow fast integration of CADEditorX to the final application.
CADEditorX scope of use:
Main Features
Demo Examples
The SDK includes demo examples presented as executable files and the source code in popular programming languages: C#, Delphi, VB.NET, HTML, VC++, VBA etc.
|
|
|
C# Demo |
VBA Demo |
Delphi Demo |
To learn instructions, commands and system variables it is especially convenient to use the XML IDE application. In this application you will find a lot of XML instruction examples and what is more you can immediately see the result of their execution.
The How to section of the CADEditorX help system contains ready solutions with the code examples showing how to handle the most important operations.
The most important functions that can be implemented with the help of CAD XML API are described in this section.
There are two ways allowing creating and processing XML format.
XML as simple string
XML can be created as a simple string with the help of any programming language This is the most simple way that can be recommended for initial investigation and for many projects where there is no need to handle complicated XML files.
A simple way to work with CAD XML API:
1. Look at the example XML files and How to help section.
2. Create XML strings on the basis of demo examples to implement the required features.
3. You can either load XML files from HDD or add all these XML texts as string constants directly to the application source code.
We recommend to use the Format() function (which is present in all popular programming languages) to insert data to XML strings.
C# example for calling line:
string command = @"
"; string result = CADEditorX.ProcessXML(command); |
XML obtained with the help of the OnProcess callback function can be also parsed using the common functions used to parse strings in your programming language.
C# example for the OnProcess callback:
string result = CADEditorX.ProcessXML(""); |
XML Parser
There are many XML parsers that are suggested for all popular development languages. Microsoft Windows has the DOM technology for handling XML, which is very powerful but not very fast. There are a lot of simple and fast XML parsers that are suggested as opensource for many programming languages.
It is recommended to use XML parser to implement complicated tasks with the help of CAD XML API.
These instruments work via the command line that can be used directly in the corresponding panel of the user interface.
The command instruction is used to call the functional via the CAD XML Interface.
Supported commands are described in the User Reference.
Example showing how to start drawing a line:
|
You can find examples of the most important command calls in the Commands section of the XML editor:
© Copyright 2000-2023 COGITO SOFTWARE CO.,LTD. All rights reserved