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

How to create folder in View Map using ArchiCAD API?


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

Akos Somorjai

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

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

Hi @Akos Somorjai ,

Can you help me, please?

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!