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()

符号表

AcDbDatabase::blockTableId()
AcDbDatabase::layerTableId()
AcDbDatabase::textStyleTableId()
AcDbDatabase::dimStyleTableId()
AcDbDatabase::linetypeTableId()
AcDbDatabase::UCSTableId()
AcDbDatabase::viewTableId()
AcDbDatabase::viewportTableId()
AcDbDatabase::regAppTableId()

块表

  1. 当前空间
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()
上一篇下一篇

猜你喜欢

热点阅读