ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Stretching Dimensions

2 REPLIES 2
Reply
Message 1 of 3
EMD1954
149 Views, 2 Replies

Stretching Dimensions

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

2 REPLIES 2
Message 2 of 3
Kyudos
in reply to: EMD1954

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

Message 3 of 3
EMD1954
in reply to: Kyudos

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.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost