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

APINavigator_NewNavigatorViewID create fail

Anonymous
Not applicable
Hi.
I want to save current view in my created folder.
Howerver I create it by ACAPI_Navigator, the error is "The passed parameters are inconsistent".
My code is :

        API_NavigatorItem saveItem;
	BNZeroMemory(&saveItem, sizeof(API_NavigatorItem));
	saveItem.customName = true;
	strcpy_s(saveItem.name, folderName.ToCStr().Get());

	saveItem.itemType = API_StoryNavItem;
	saveItem.mapId = API_PublicViewMap;

	API_NavigatorView saveView;
	BNZeroMemory(&saveView, sizeof(API_NavigatorView));
	
        GS::Guid parentAndChild[2]
	parentAndChild[0] = APIGuid2GSGuid(guid);// Folder guid
	parentAndChild[1] = APIGuid2GSGuid(APINULLGuid);
	err = ACAPI_Navigator(APINavigator_NewNavigatorViewID, &saveItem,&saveView,parentAndChild);
Thanks.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Ralph Wessel
Mentor
The final parameter in the call to APINavigator_NewNavigatorViewID should probably be nullptr (where you pass parentAndChild). That parameter is only used when creating a folder item in the navigator.
Ralph Wessel BArch
Active Thread Ltd

View solution in original post

2 REPLIES 2
Anonymous
Not applicable
Hi.
Can anyone give a hint?
Thanks.
Solution
Ralph Wessel
Mentor
The final parameter in the call to APINavigator_NewNavigatorViewID should probably be nullptr (where you pass parentAndChild). That parameter is only used when creating a folder item in the navigator.
Ralph Wessel BArch
Active Thread Ltd