ObjectARX

作者: 王姚 | 来源:发表于2018-03-16 08:10 被阅读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()
    

    块表

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

    相关文章

      网友评论

          本文标题:ObjectARX

          本文链接:https://www.haomeiwen.com/subject/elikqftx.html