2023-11-09 06:42 PM - last edited on 2024-09-16 02:38 PM by Doreena Deng
Hello everyone,
Do you know how to create a folder in View Map ( like the picture below) in ArchiCAD API C++?
Can you help me do it?
Thanks in advance
Solved! Go to Solution.
2023-11-10 07:53 AM
Hello there,
Please use the partly misleading `ACAPI_Navigator_NewNavigatorView()` function to set the first parameter's `itemType` to `API_FolderNavItem`. In this case, the second parameter (`navigatorView`) is ignored.
Best, Akos
2023-11-10 07:53 AM
Hello there,
Please use the partly misleading `ACAPI_Navigator_NewNavigatorView()` function to set the first parameter's `itemType` to `API_FolderNavItem`. In this case, the second parameter (`navigatorView`) is ignored.
Best, Akos
2023-11-10 11:30 AM - last edited on 2023-11-15 01:55 AM by Laszlo Nagy
Hi @Akos Somorjai ,
Thank you very much. I followed your advice and it worked.
But now can you help me with this?
I have created a folder and also created a view, now I want that view to be in the folder created above.
I do like this but it doesn't work properly. Can you look at it and tell me where I'm wrong.
Code here:
//Create Folder
API_NavigatorItem folderItem;
BNZeroMemory(&folderItem, sizeof(API_NavigatorItem));
folderItem.itemType = API_FolderNavItem;
folderItem.mapId = API_PublicViewMap;
GS::ucscpy(folderItem.uName, viewName.ToUStr());
ACAPI_Navigator(APINavigator_NewNavigatorViewID, &folderItem, NULL, NULL);
GS::Guid parentAndChild[2];
parentAndChild[0] = APIGuid2GSGuid(folderItem.guid);// Folder guid
parentAndChild[1] = APIGuid2GSGuid(APINULLGuid);
API_NavigatorItem saveItem;
BNZeroMemory(&saveItem, sizeof(API_NavigatorItem));
saveItem.itemType = API_StoryNavItem;
saveItem.mapId = API_PublicViewMap;
saveItem.floorNum = story.Id;
GS::ucscpy(saveItem.uName, viewName.ToUStr());
saveItem.customName = true;
API_NavigatorView saveView;
BNZeroMemory(&saveView, sizeof(API_NavigatorView));
ACAPI_Navigator(APINavigator_NewNavigatorViewID, &saveItem, &saveView, parentAndChild);//saveItem
2023-11-13 03:07 PM
Hi @Akos Somorjai ,
Can you help me, please?