We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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();
}
}


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