Alloys For Galvanizing Process alloy used in galvanizing process,Zinc nickel alloy,Allumen,Zinc Aluminum, Multielement alloys,Zinc Rare Earth Alloys Xinbai Plating(jiangsu) Intelligent Technology Co.,Ltd , https://www.hotgalvanizing.com
Fig. 1: Traditional connection mode between calculation and drawing programs in CAD tools.
Fig. 2: Connection model using ActiveX technology.
**1. Introduction**
In traditional tool CAD applications, especially those developed under AutoCAD R14 using Autolisp or ADS, the design process typically involves separate development of calculation and drawing modules. This is because tool design requires parameter calculations and verification, followed by graphical representation. To link these two parts, developers often rely on intermediate data files. The calculated results are first saved into a file, and then the drawing program reads the data line by line to generate the corresponding graphics.
This conventional approach, while functional, suffers from several drawbacks. It involves a decentralized structure, complex file handling, and strict operational sequences, which result in slower performance, less convenience, and lower automation.
With the introduction of ActiveX technology in AutoCAD 2000 and later versions, it became possible to directly integrate calculation, verification, and drawing processes without relying on external data files. As shown in Figure 2, this new model significantly improves speed, usability, and automation.
**2. Introduction to ActiveX Technology**
ActiveX is a set of technologies based on the Component Object Model (COM). It allows developers to package COM components and embed them into applications. ActiveX controls are essentially COM components that support the protocols required for visual application development. Many popular applications, such as Microsoft Excel, Word, Access, Visual Basic, Visual C++, and Delphi, support ActiveX and can interact with ActiveX objects directly.
AutoCAD ActiveX is an implementation of ActiveX technology specifically designed for AutoCAD. It enables both internal control of AutoCAD through programming and external access to AutoCAD objects. The AutoCAD ActiveX object model is illustrated in Figure 3.
[ s ]. Collection object [ o ]. Object
Figure 3: AutoCAD ActiveX object model.
**3. Manipulating AutoCAD Objects in VB**
Using ActiveX controls allows developers to work with objects in a way similar to other standard objects. This involves assigning an object reference to a variable and then using its methods, properties, and events. In Visual Basic, AutoCAD objects can be accessed directly via AutoCAD ActiveX.
To do this, you first need to reference the AutoCAD type library in your VB project. Go to the Project menu, select References, and choose the AutoCAD 2000 Object Library, as shown in Figure 4. Once this is done, you can create AutoCAD application and document objects in your code. These objects allow you to manipulate AutoCAD drawing files through the ActiveX interface.
Figure 4: Referencing the AutoCAD type library in the project.
Figure 5: Typical complex tool CAD system interface.
**4. Application Example**
A typical example of this approach is the complex tool CAD system developed at Quzhou University. Built using Visual Basic, this system successfully integrates the calculation and drawing modules using ActiveX technology.
The system interface, as shown in Figure 5, allows users to input known parameters and select the calculation option. After the calculation is verified, the drawing option can be used to generate the tool's graphic. The code used to connect with the AutoCAD application and generate the tool entity is as follows:
Application of ActiveX Technology in Tool CAD
**Summary:**
By leveraging ActiveX technology, it is now possible to directly manipulate AutoCAD objects within other applications, enabling a seamless integration between the calculation and drawing programs. This approach replaces the traditional method of linking these programs through data files when using secondary languages like Autolisp or ADS. The new model offers improved efficiency, ease of use, and higher automation levels.