ObjectARX
2018-03-16 本文已影响0人
王姚
获取当前文档
#include <acdocman.h>
1. curDoc()
AcApDocument* curDoc() { return ::acDocManager->curDocument(); }
2. acDocManager->curDocument();
#define acDocManager acDocManagerPtr()
3. acDocManagerPtr()->curDocument();
获取当前数据库
1. acdbHostApplicationServices()->workingDatabase()
2. curDoc()->database()
符号表
- Block Table 块表
- Layer Table 层表
- TextStyle Table 文字样式表
- DimStyle Table 尺寸样式表
- Linetype Table 线型表
- UCS Table 用户坐标系表
- View Table 视图表
- Viewport Table 视口表
- RegApp Table 应用程序注册表
AcDbDatabase::blockTableId()
AcDbDatabase::layerTableId()
AcDbDatabase::textStyleTableId()
AcDbDatabase::dimStyleTableId()
AcDbDatabase::linetypeTableId()
AcDbDatabase::UCSTableId()
AcDbDatabase::viewTableId()
AcDbDatabase::viewportTableId()
AcDbDatabase::regAppTableId()
块表
- 当前空间
AcDbDatabase::currentSpaceId()
2.模型空间与图纸空间
#define ACDB_MODEL_SPACE ACRX_T("*Model_Space")
#define ACDB_PAPER_SPACE ACRX_T("*Paper_Space")
AcDbBlockTable::getAt(ACDB_MODEL_SPACE, ...)
AcDbBlockTable::getAt(ACDB_PAPER_SPACE, ...)
字典
- 组
- 布局
- 命名对象字典
AcDbDatabase::groupDictionaryId()
AcDbDatabase::layoutDictionaryId()
AcDbDatabase::namedObjectsDictionaryId()