Changing Elevation name - unwanted changes to story lines - C++ AC25
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2025-02-18 06:27 AM
2025-02-18
06:27 AM
I am new to API writing, first attempt...
I am trying to change elevation marker names-but the following code the story height display inside the views as well.
the story markers displayed are not controlled by the story levels setting.
before running script :
after running script:
GSErrCode err = NoError;
API_Element element, elementMask;
GS::Array<API_Guid> elemList;
ACAPI_Element_GetElemList(API_ElevationID, &elemList);
size_t count = elemList.GetSize();
BNZeroMemory(&element, sizeof(API_ElevationID));
for (short e = 0; e < count; e++)
{
element.header.typeID = API_ElevationID;
element.header.guid = elemList[e];
err = ACAPI_Element_Get(&element);
if (err != NoError)
{
break;
}
GS::UniString name = element.elevation.segment.cutPlName;
if (name == "B") {
ACAPI_ELEMENT_MASK_CLEAR(elementMask);
ACAPI_ELEMENT_MASK_SET(elementMask, API_ElevationType, segment.cutPlName);
GS::ucscpy(element.elevation.segment.cutPlName, L("Z"));
if (element.header.guid != APINULLGuid) {
err = ACAPI_Element_ChangeParameters({ element.header.guid }, &element, nullptr, &elementMask);
if (err != NoError) {
ErrorBeep("ACAPI_Element_ChangeParameters", err);
}
}
ACAPI_ELEMENT_MASK_CLEAR(elementMask);
}
}
return;
I know there is something i am missing, i just don't know where to look next.
It is inconsistent as to when it happens.
It displays markers when the setting is set to no marker.
When i change to a marker, and close then open and change to no marker, then it display correctly.
I have been using ArchiCAD continually since ArchiCAD 4.5, 4.5.5, 5, 5.1, 6, 6.5, 7, 8, 8.1, 9, 10, 11, 12, 13, 15, 18, 21, 22, 25, now testing 28
Member of Architalk since 2003, but missed the migration to Graphisoft. Melbourne, Australia
Member of Architalk since 2003, but missed the migration to Graphisoft. Melbourne, Australia
0 REPLIES 0