2023-09-09 10:50 AM - last edited on 2024-09-16 02:53 PM by Doreena Deng
hehey evrybody!
The ACAPI_Automate Call has this cool feature where you can call "APIDo_GoToViewID"
https://archicadapi.graphisoft.com/documentation/apido_gotoviewid?s=APIDo_GoToViewID
and there are even a few posts about this method:
https://community.graphisoft.com/t5/Archicad-C-API/APIDo-GoToViewID/m-p/355172
this one is very helpfull since it says exactly waht to do: Convert a API_Guid to as GS::Guid and then to a c string.
But unfortunaltly waht ever i do, i allways get a APIERR_BADPARS error. i tried evry possible flavour, no luck.
example:
API_Guid to GS::Guid with "APIGuid2GSGuid(guid1)", then GS::Guid to GS::String with "ToString()" and then to const char * with "ToCStr()"
i retrieve the GUID of the navigator item trough APINavigator_SearchNavigatorItemID and im using the navItem.guid.
i want to open a NavItem and not go trough an API_Element like in the example.
does anyone have a tipp?
Solved! Go to Solution.
2023-09-12 10:31 PM
@SzokeFerenc was so nice to help me out with this one:
GS::Guid itemGuid = APIGuid2GSGuid(item.guid);
char guidStr[256] = "0";
GSErrcode err = itemGuid.ConvertToString(guidStr);
Thank you very much!! 🙂
2023-09-12 10:31 PM
@SzokeFerenc was so nice to help me out with this one:
GS::Guid itemGuid = APIGuid2GSGuid(item.guid);
char guidStr[256] = "0";
GSErrcode err = itemGuid.ConvertToString(guidStr);
Thank you very much!! 🙂