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

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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

APINavigator_SearchNavigatorItemID question

SzokeFerenc
Booster

Hello Everybody!

 

I'm experimenting with the ACAPI_Navigator functions. My question is why does included code part only find navigator items with type: API_StoryNavItem, API_PerspectiveNavItem and API_AxonometryNavItem?

GS::Array<API_NavigatorItem> possible_items;
possible_items.Clear();
GS::Array<API_NavigatorItem> found;
API_NavigatorItem nav_item;
nav_item.mapId = API_PublicViewMap;

for (Int32 type_ID = API_UndefinedNavItem; type_ID <= API_DrawingNavItem; type_ID++)
{
    nav_item.itemType = (API_NavigatorItemTypeID) type_ID;
    found.Clear();
    err = ACAPI_Navigator(APINavigator_SearchNavigatorItemID, &nav_item, nullptr, &found);
    ACAPI_WriteReport("TypeID: " + GS::ValueToUniString(type_ID) + " found: " + GS::ValueToUniString(found.GetSize()), true);
    if (err == NoError && found.GetSize() > 0)
    {
	possible_items.Append(found);
    }
						
}

I want to find all the NavigatorItems in the PublicViewMap, but this function seems to ignore sections and elevations and all other than above mentioned types. What other parameters of nav_item need to be set to get all the NavigatorItems?

Any help is appreciated!

1 REPLY 1
gustavorochakv
Booster

Same here on both AC23 and AC26. No idea if that's intended (for whatever seemingly undocumented reason) or a bug.

 

Edit: FYI, I've worked around this issue by parsing the entire navigator map tree