We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2013-11-06 07:28 AM - last edited on 2023-08-01 06:57 PM by Doreena Deng
if (navi_map_id == API_PublicViewMap && j == 0) { API_NavigatorItem navi_item; navi_item.mapId = API_PublicViewMap; navi_item.itemType = API_UndefinedNavItem; //navi_item.itemType = API_FolderNavItem; sprintf(navi_item.name, "sample navi item"); // sets the navigator view to default values API_NavigatorView navi_view; BNZeroMemory(&navi_view, sizeof(API_NavigatorView)); GS::Guid parent_child[2]; parent_child[0] = APIGuid2GSGuid((*items).guid); parent_child[1] = APIGuid2GSGuid(set.guid); err = ACAPI_Environment(APIEnv_NewNavigatorViewID, &navi_item, &navi_view, &parent_child); if (err != NoError) { DBPrintf("ERROR@%d: ACAPI_Environment(APIEnv_NewNavigatorViewID) error 0x%08X [%s]", __LINE__ - 4, err, ErrID_To_Name(err)); continue; //return err; } DBPrintf("Successfully added \"%s\".", navi_item.name); }
ERROR@xxx: ACAPI_Environment(APIEnv_NewNavigatorViewID) error 0x81060065 [APIERR_BADID]If I use the
API_NavigatorItem navi_item; BNZeroMemory(&navi_item, sizeof(API_NavigatorItem)); navi_item.mapId = API_ProjectMap; ACAPI_Environment(APIEnv_GetNavigatorItemID, &some_guid, &navi_item); API_NavigatorView navi_view; BNZeroMemory(&navi_view, sizeof(API_NavigatorView)); //... add navi_view settings here GS::Guid parent_child[2]; //... parent_child guids here ACAPI_Environment(APIEnv_NewNavigatorViewID, &navi_item, &navi_view, &parent_child);Now that I can create it, the problem is I can't add it on a folder. I first tried to create a folder within a folder to see if it is possible to add an item (
: |-- parent_item_guid | |-- <APINULLGuid> | |-- child_item_guid | |-- *<-- new item here : : | '-- last_child_item_guid :
2014-01-16 06:28 AM
2014-01-16 03:07 PM