1... Net-based development
(1). Net API Introduction
In AutoCAD 2006 and later versions, Autodesk added. Net API for its development .. . Net API provides a series of managed outsourcing classes (managed Wrapper class), allowing developers.. NET Framework.. NET language, such as VB.. net, C #, and managed C ++. Its advantage is completely object-oriented.
(2) Main differences between. Net APIs and traditional ObjectARX APIs
First, in the VC environment,ProgramYou need to manage the memory application and release by yourself. net adopts the garbage collection mechanism. the. NET Framework determines the timing of memory recovery and recycles it to solve the memory leakage problem that causes headaches for C ++ programmers. The. net api mainly uses the dispose function to release resources.
Second, reactor in ObjectARX maps outsourcing classes to various events in. Net APIs. You can define the response functions of these events to respond to various operations in AutoCAD.
2. AutoCAD objects are divided:
(1) graphic objects: such as line, arc, text, and dimensions ).
(2) style setting objects, such as linetypes and dimstyles.
(3) Organizational Structure objects: layers, group, and block.
(4) graphical display objects, such as views and views.
(5) AutoCAD application and document ).
The top layer is the AutoCAD application object (application), which is the basis of the object model and is called the root object.
3. Data Structure of the AutoCAD file (DWG)