Stretching Dimensions

Stretching Dimensions

EMD1954
Advocate Advocate
598 Views
2 Replies
Message 1 of 3

Stretching Dimensions

EMD1954
Advocate
Advocate

I create a Dimension Style and it works fine, but when I stretch it, the text does not re-center.  Here's part of my code:

pDimTable->upgradeOpen();
pDimTblRecord = new AcDbDimStyleTableRecord;
pDimTblRecord->setDimscale(96.0);               // dim scale
pDimTblRecord->setDimtxt(0.25);                 // height of text
pDimTblRecord->setDimzin(0);                    // 0'-0"
pDimTblRecord->setDimblk(_T("_CLOSEDFILLED"));  // arrow type
pDimTblRecord->setDimunit(4);                   // architectural
pDimTblRecord->setName(csStyleName);
pDimTblRecord->setDimrnd(0.0);                  // round-off values set to none
pDimTblRecord->setDimtad(1); // sets vertical text position to above the line
pDimTblRecord->setDimtoh(0); // aligns text with the dimension line
pDimTblRecord->setDimjust(0);                   // Positions the text above the dimension line and center-justifies it between the extension lines
 
pDimTblRecord->setDimtxsty(recId);              // text style record id for "SIMPLEX" - see above
 
pDimTblRecord->setDimfrac(2);                   // fractions not stacked

 

What am I missing?

 

Thanks,

Ed

0 Likes
599 Views
2 Replies
Replies (2)
Message 2 of 3

Kyudos
Advisor
Advisor

setTextPosition ?

 

EDIT:....sorry you're talking about dim styles not dims....I'd guess it's almost certainly to do with the text style associated with the dim style....is that centered? AutoCAD itself indicates this could be the DIMTAD, DIMJUST and DIMTXTDIRECTION variables

0 Likes
Message 3 of 3

EMD1954
Advocate
Advocate

Yes sorry, it was for dimstyle.  FYI, if I add:

 

acedCommandS(RTSTR, _T("_DIMTEDIT"), RTSTR, _T("L"), RTSTR, _T("C"), RTSTR, _T(""), RTNONE);

 

after creating the dimension, it works fine.  Seems there some switch I'm not setting and I tried DDIMTIH, DIMTOFL, DIMSOXD and DIMATFIT.

 
0 Likes