BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Archicad C++ API
About Archicad add-on development using the C++ API.

how to modify the dimension text angle?

Anonymous
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();
}
}
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
Learn and get certified!