cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Streamline your workflows and master BIM coordination! Program starts April 28!

Archicad C++ API
About Archicad add-on development using the C++ API.

how to modify the dimension text angle?

Not applicable
hello

how to modify the dimension text angle?

we can get text value, but it is not modify below code..

help me.

thank you.

-------------------------------------------------------------------

AcElemHeadArray headArray;
long nSel = AcElement::GetSelection(&headArray, API_DimensionID);

for (int i = 0; i < nSel; i++)
{
AcElemHead head = headArray.GetAt(i);
AcElemDimension dimen;
if (!dimen.Get(head.GetIndex())) continue;

API_ElementMemo* memo = dimen.GetMemo();
API_DimElem** dimElems = memo->dimElems;

long nCount = dimen.GetNDimElem();

for(int j=0;j<nCount-1;j++){
((*dimElems)).note.noteAngle= 3.14;
dimen.Change();
}
}


xx.jpg

1 REPLY 1
Hoa Tu
Newcomer
Hi,
I have tried the same thing and unsuccessful. But if you change the text angle manually first then the program will work.
One other thing I found is if the dimension has mixture of static and non static nodes, the ACAPI_Element_Change function will remove all the static nodes.

Cheers,
Hoa