4 weeks ago - last edited 4 weeks ago
I previously left an inquiry regarding ExternalGlobalId.
Problem 1
I tried to use it without ExternalGlobalId but still have the same problem.
If IFCAPI::GetObjectAccessor().GetIFCType(objectID.Unwrap())'s or or IFCAPI::GetObjectAccessor().GetGlobalId(objectID.Unwrap())'s ok_ is false, I got an access error.
The error occur in 'ACAPI::Result<GS::UniString, ACAPI::Error>::~Result<GS::UniString, ACAPI::Error>()' and 'ACAPI::details::Storage<GS::UniString, ACAPI::Error>::destroy(ACAPI::details:;err_tag__formal)'.
This is the same as ExternalGlobalId.
I tried to solve it using try-catch but it doesn't work.
void GetIFCTypeID(API_Guid elemGuid, GS::UniString& ifcType, GS::UniString& ifcIdStr)
{
API_Elem_Head elemHead;
elemHead.guid = elemGuid;
ACAPI_Element_GetHeader(&elemHead);
auto objectID = IFCAPI::GetObjectAccessor().CreateElementObjectID(elemHead);
if (objectID.IsOk())
{
auto ifcTypeResult = IFCAPI::GetObjectAccessor().GetIFCType(objectID.Unwrap());
if (ifcTypeResult.IsOk())
{
ifcType = ifcTypeResult.Unwrap();
auto globalId(IFCAPI::GetObjectAccessor().GetGlobalId(objectID.Unwrap()));
if (globalId.IsOk())
ifcIdStr = globalId.Unwrap();
}
}
}
Problem 2
The object has an IFC Type and a Global ID, but GetIFCType and GetGlobalId return false.
This is parameters.
And this is elements's property in archicad.
Unique ID is same with elemGuid.
In archicad IFC Type and GlobalId is Exist.
But, in source code, ifcTypeResult's ok_ is false.
Solved! Go to Solution.
Thursday
Hi
For problem 2:
If the element is a Site Geometry, it won't be exported as a standalone element to IFC. It's geometry will only be part of the exported IfcSite, along with all other Site Geometry elements. So it won't have it's own IFCType or GlobalID, as it won't be an identifiable part of the exported IFC containment.
The Settings dialog is sadly bugged, showing some false technical data, but the IFC section shouldn't really appear there either.
Thursday
Hi
For problem 2:
If the element is a Site Geometry, it won't be exported as a standalone element to IFC. It's geometry will only be part of the exported IfcSite, along with all other Site Geometry elements. So it won't have it's own IFCType or GlobalID, as it won't be an identifiable part of the exported IFC containment.
The Settings dialog is sadly bugged, showing some false technical data, but the IFC section shouldn't really appear there either.