Read and set Dimension style from current drawing file.

Read and set Dimension style from current drawing file.

jlobo2
Advocate Advocate
482 Views
1 Reply
Message 1 of 2

Read and set Dimension style from current drawing file.

jlobo2
Advocate
Advocate

How do I read, from a Dimension Style table in the current drawing, and set it to an object to be used later for drawing?

 

The code below, returns object id as null. Am I missing something here?

Thank You for your help in advance.

 

AcDbDimStyleTable *pDimensionStyleTbl;

theDb->getSymbolTable(pDimensionStyleTbl, AcDb::kForRead);
pDimensionStyleTbl->getAt(_T("_STANDARD"), idDimensionStyleStandard);
0 Likes
483 Views
1 Reply
Reply (1)
Message 2 of 2

Virupaksha_aithal
Autodesk Support
Autodesk Support

Hi,

 

Please try.. something like

AcDbDimStyleTable *pDimStyleTable = NULL;
AcDbDatabase *pDwg = acdbHostApplicationServices()->workingDatabase();
if (pDwg->getDimStyleTable(pDimStyleTable, AcDb::kForRead) == Acad::eOk)
{
}

 



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

0 Likes