2025-11-06 08:59 AM
Good morning!
We have a customer ticket about Archicad freezing. I tracked it down to our call of ACAPI_View_GoToView—in Archicad 26 (where our customer reported it) it seems to freeze Archicad up indefinitely (the call doesn't return); in Archicad 29, where I now tested it as well, Archicad seems to recover after several minutes, but that seems awfully slow as well though.
If anyone from Graphisoft can help with that issue we've been given the OK to share the project in question with you, but of course not publicly.
I would have reported this in some bug tracker, but I found nowhere to file bugs with an actual description, unless Archicad crashes and you get the crash dialog, even launching the BugReporter tool on its own I saw no open to add a description, that's why I'm posting it here now.
2025-11-06 03:38 PM
Hi @J_Studanski,
I've tried the following code example for the function ACAPI_View_GoToView to go to the linked view of the (first) selected drawing and have no issue with it in AC29:
API_SelectionInfo selInfo{};
GS::Array<API_Neig> selNeigs{};
err = ACAPI_Selection_Get (&selInfo, &selNeigs, false);
if (err != NoError) {
ACAPI_WriteReport ("Err SelectionGet: %d", true, err);
return err;
}
if (selNeigs.IsEmpty ()) {
ACAPI_WriteReport ("EMPTY!", true);
return err;
}
API_Element drawingElem{};
drawingElem.header.guid = selNeigs[0].guid;
err = ACAPI_Element_Get (&drawingElem);
if (err != NoError) {
ACAPI_WriteReport ("Err GetElem: ", true, err);
return err;
}
API_DrawingLinkInfo drwLinkInfo{};
err = ACAPI_Drawing_GetDrawingLink (&drawingElem.drawing.head.guid, &drwLinkInfo);
if (drwLinkInfo.linkPath != nullptr) { delete drwLinkInfo.linkPath; }
if (drwLinkInfo.viewPath != nullptr) { BMKillPtr (&drwLinkInfo.viewPath); }
err = ACAPI_View_GoToView (APIGuidToString (drwLinkInfo.linkGuid).ToCStr ().Get ());
if (err != NoError) {
ACAPI_WriteReport ("Err GoToView: ", true, err);
return err;
}
Can you post a snippet of your code for comparison?
Also happy to help in private in case nobody from Graphisoft is available to help.
Best regards,
Bernd
2025-11-06 07:05 PM
Thank you, Bernd, but in this case this won't be much help—we use the function all over our code base too (and have done so since Archicad 21), it's not like it generally fails or as if something changed in our code base. It causes Archicad to freeze only in a very specific customer project, as far as we know, and there's nothing special in our code path I could show you.
We'd need someone from Graphisoft who has access to the API internals to perform the call with an attached debugger so they can figure out where they stall inside their own codebase.
a month ago
Hello Johann,
Please send me the link to the file in a PM; I'll ask someone in the team to take a look.
Best, Akos