2025-04-15
10:35 AM
- last edited
a month ago
by
Laszlo Nagy
I made some tests with GSID functions to get user ID and organization IDs but there are some issues.
This is the code:
GS::UniString userStr;
GS::UniString orgsStr;
auto gsid = ACAPI::CreateGSIDObject();
if (!gsid.IsErr())
{
auto userId = gsid->GetUserId();
if (userId.IsOk())
userStr = *userId;
auto userOrgs = gsid->GetOrganizationIds();
if (userOrgs.IsOk())
{
for (const auto& userOrg : *userOrgs)
{
orgsStr += userOrg + ", ";
}
}
}
I tried this code on Windows in Archicad 27 and 28 with same behavior.
If there is no logged user in Archicad there is an exception when class
destructor of "userId" is called at the end.
If there is a logged user in Archicad instead userId is OK, but the line
"for (const auto& userOrg : *userOrgs)" raises an exception.
Thanks in advice
3 weeks ago
Does the same thing happen with both release and debug builds? And is this on macOS or Windows?
3 weeks ago
The issue is only on Windows and happens with both debug and release versions.
3 weeks ago
Is your release build linking against any debug libraries, e.g. MSVCRTD.lib?
3 weeks ago
No, no debug libraries linked in release version.