License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
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
Software Engineer Speckle Systems

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
Software Engineer Speckle Systems

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!