www.mxdraw.com
|
标注样式记录类型
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();