www.mxdraw.com
内容索引主面
前一个向上下一个
McDbDimStyleTableRecord 类

标注样式记录类型

C++
class McDbDimStyleTableRecord : public McDbSymbolTableRecord;

McDbDimStyleTable.h

例如:

        McDbObjectPointer<McDbDimStyleTableRecord>  spDimStyleRecord(acdbCurDwg()->dimstyle(),
                                                                     McDb::kForWrite);
        if(spDimStyleRecord.openStatus() == Mcad::eOk)
            spDimStyleRecord->setDimscale(100);
        #define MY_DIM_STYLE_NAME _T("TJ__MyDimStyle")
        McDbDatabase* pDatabse = acdbCurDwg();
        McDbDimStyleTablePointer spDimStyle(pDatabse,McDb::kForWrite);      if(spDimStyle.openStatus() != Mcad::eOk)            return; 
        McDbObjectId recId;
        if(spDimStyle->getAt(MY_DIM_STYLE_NAME,recId) == Mcad::eOk)
        {
            // 已经创建了MY_DIM_STYLE_NAME
            return;
        }
        McDbDimStyleTableRecord* pRecord = new McDbDimStyleTableRecord;
        pRecord->setName(MY_DIM_STYLE_NAME);
        pRecord->setDimscale(100);  // 修改标注的缩放比例.
        pRecord->setDimdec(1);      // 修改小数位精度.
        spDimStyle->add(pRecord);
        pDatabse->setDimstyle(pRecord->objectId() );
        pRecord->close();
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!