当前位置:网站首页>CAD secondary development object
CAD secondary development object
2022-07-02 06:59:00 【Xu Jirong】
From https://blog.csdn.net/adliy_happy/article/details/77715210?spm=1001.2014.3001.5501
Application object It is opened every time AutoCAD Application instance . The main function is to maintain Document( file ) And Database( database ) Consistency between . The application program displays the information in the database on the document for users to view , When the user operates the document to update the document, save the updated data back to the database . adopt Application Object you can get the object related to the operation of the current application . You can also set it through its properties and methods AutoCAD Program parameters and system variables .
Document( file ) object It's actually **Database( database )** In the view displayed to the user , One document and one Database( database ) It's one-to-one . It follows Application( Applications ) The regulation of Database( database ) The objects in are displayed to the user , At the same time, the user is right Document( file ) The operation of will also pass Application( Applications ) Write back to the database , When modifying the database in the background, in order to prevent the foreground document from being modified at the same time, the document must be locked first , Unlock the document after the operation .
Editor Namely AutoCAD Command line in the interface , It is a tool for users to interact with Applications . AutoCAD The basic input and output functions of interaction with users are Editor Object .
Transaction ( Business ) Is an object used to control database operations . When opening and processing database objects Transaction Provides an automatic shutdown mechanism , To avoid forgetting to close the object after it is opened, which will cause errors in the next operation of the object .
Database yes DWG The representation of a file in memory , Is a container for storing database objects . Database It mainly stores a large number of container objects : **SymbolTables( The symbol table )** And NameDictionaries( Named object dictionary ), All graphical objects and most non graphical objects are stored in the container .
From https://wenku.baidu.com/view/af9a571948d7c1c709a1457b.html
DBObject( Database objects )
DBObject Is the base class of all database objects. It is an abstract class , All database objects are derived from it , His attribute method is applicable to all subclasses .
Objects in a program may have two states 1、 In memory ( Instantiated but not added to the database ): You can modify the properties of the object at will .2、 In the database : You need to open it to modify properties .
SymbolTable( The symbol table ) yes AutoCAD Base class of table object , Symbol tables are container objects , For storage SymbolTableRecord( Symbol table records ).
SymbolTableRecord( Symbol table records ) Are the elements that make up the symbol table . Only specific symbol table records can be stored in a specific symbol table , Such as : In the block table , Only block table records can be stored .
DBDictionary ( The dictionary ) Is a general container object , Used to store non graphical objects . Unlike the symbol table , Only objects recorded in the fixed symbol table can be accessed in the symbol table , A dictionary can store many kinds of documents at the same time DBObject Class derived objects (Entity) With the exception of ( Dictionaries can also be stored in dictionaries ). Objects commonly used to store in dictionaries are DataTable( Data sheet )Xrecord( Extended records ).
Dictionaries exist mainly in two ways. One is the data stored in the database to save the whole drawing, which is called NameDictionaries( Named object dictionary ), One is the information data stored in the object to save the object, which is called ExtensionDictionary( Object extension dictionary ).
1、 NameDictionaries( Named object dictionary )
Every DWG Every database has a named object dictionary , Named object dictionaries are often used to store global extended data .
2、 ExtensionDictionary( Object extension dictionary )
All database objects can contain an extended dictionary , Used to store user-defined data , Unlike the named object dictionary , These data are stored at the object level, that is, the subsidiary information of the object .
DataTable( Data sheet ) yes AutoCAD A table used to organize data in , Is a database object used to store data , The drawing global information data can be stored in the named object dictionary , It can also be placed in the object extension dictionary to store the attribute data of the object , He compared XRecord The advantage is that : Organizing data in tabular form is more organized .
Xrecord( Extended records ) Maximum storage 2GB The data of .
Field( Field ) Is a container for storing expressions , Can store characters 、 Expressions that point to system variables 、 Formulas, expressions, etc . These expressions are used to display data that may be modified during the life cycle of the drawing . When fields are updated , The latest data will be displayed . Fields can be inserted into any kind of text ( Except for tolerances ) in , This includes table cells 、 Attribute and text in attribute definition . When operating in the Block Editor , You can use block placeholder fields in block attribute definitions .
Entity( Entity object ) Is the base class for all visible objects , Visible objects inherit their properties and methods .
边栏推荐
- Common prototype methods of JS array
- ts和js区别
- Record RDS troubleshooting once -- RDS capacity increases dramatically
- Sentry construction and use
- Underlying mechanism mvcc
- CAD二次开发 对象
- Solution to the black screen of win computer screenshot
- php中时间戳转换为毫秒以及格式化时间
- [leetcode question brushing day 35] 1060 Missing element in ordered array, 1901 Find the peak element, 1380 Lucky number in matrix
- Sqli-labs customs clearance (less18-less20)
猜你喜欢
Cve - 2015 - 1635 (ms15 - 034) réplication de la vulnérabilité d'exécution de code à distance
Wechat applet Foundation
【文献阅读与想法笔记13】 Unprocessing Images for Learned Raw Denoising
Latex 报错 LaTeX Error: The font size command \normalsize is not defined问题解决
Latex warning: citation "*****" on page y undefined on input line*
js中map和forEach的用法
Uniapp introduces local fonts
Self study table Au
Sublime text configuring PHP compilation environment
uniapp引入本地字体
随机推荐
sprintf_ How to use s
Latex 编译报错 I found no \bibstyle & \bibdata & \citation command
php中删除指定文件夹下的内容
SQLI-LABS通关(less2-less5)
(the 100th blog) written at the end of the second year of doctor's degree -20200818
CVE-2015-1635(MS15-034 )远程代码执行漏洞复现
VSCODE 安装LATEX环境,参数配置,常见问题解决
PXC high availability cluster summary
Blog directory of zzq -- updated on 20210601
The use of regular expressions in JS
JS countdown case
Présence d'une panne de courant anormale; Problème de gestion de la fsck d'exécution résolu
浏览器滚动加载更多实现
js删除字符串的最后一位
Go common compilation fails
Flask migrate cannot detect db String() equal length change
There are multiple good constructors and room will problem
js删除字符串的最后一个字符
JS judge whether the object is empty
js创建一个自定义json数组