码迷,mamicode.com
首页 > 其他好文 > 详细

OBJECT ARX 获取标注样式信息

时间:2016-01-11 18:19:34      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

    CString str = _T("标注样式");
    CString strTmp(_T(""));
    ////获得当前图形的标注样式表  
    AcDbDimStyleTable* pDimStyleTbl;
    acdbHostApplicationServices()->workingDatabase()->getDimStyleTable(pDimStyleTbl, AcDb::kForWrite);

    ////是否已包含  
    if (pDimStyleTbl->has(str)){
        AcDbDimStyleTableRecord* pDims;
        pDimStyleTbl->getAt(ACDB_MODEL_SPACE, pDims, AcDb::kForWrite);
        double dTxtHeight = pDims->dimtxt();////标注文字的高度
        strTmp.Format(_T(".1f"), dTxtHeight);
        m_strTextHigh = strTmp;              ////标注文字的高度
        int i = pDims->dimadec();             //获取主单位精度
        AcDbObjectId idTextStyle = pDims->dimtxsty(); //文字样式
        AcDbTextStyleTable *pTextTable;
        if (acdbOpenObject(pTextTable, idTextStyle, AcDb::kForRead) == Acad::eOk)
        {
            pTextTable->getAt(m_strTextStyle,idTextStyle);//获取文字样式字符串
        }
        pDimStyleTbl->close();
        return;
    }

 

OBJECT ARX 获取标注样式信息

标签:

原文地址:http://www.cnblogs.com/nightnine/p/5121859.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!