2023-08-10 08:58 AM
Hi, I'm developing an add-on for archicad and I'm having a problem. I need to get a tree of all objects in the drawing, for example, how it looks in the ifc project manager.
I do the following:
1)
API_IFCTranslatorIdentifier ifcTranslator = helperFunction::GetExportTranslator();
2)
if (ifcTranslator.innerReference != nullptr)
ACAPI_Goodies(APIAny_GetIFCRelationshipDataID, &ifcTranslator, &ifcRelationshipData);
3)
I build a tree of objects from ifcRelationshipData.containmentTable
This works correctly, but when I try to get the object name by guid from ifcRelationshipData.containmentTable - in most cases I don’t receive an answer, and in the case of getting ifc properties by the same guid - I never receive an answer at all, please tell me how can I do it?
2023-08-16 07:11 AM - edited 2023-08-16 01:01 PM
w
2023-08-16 07:17 AM - edited 2023-08-16 07:20 AM
ifcRelationshipData.containmentTable allows me to get the GUID of all elements, just like in the ifc manager. However, if you look at the ifc object properties in the ifc manager, you can see that there is no Tag field. I think that is why the api functions ACAPI_Element_GetIFCAttributes and ACAPI_Element_GetIFCType return an error BAD_ID for objects that do not have a tag field in ifc attributes.
IFC attributes of the wall(have a Tag field):
IFC attributes of the project(does`n t have a tag field):
Objects of type ifcBuilding , ifcSite, ifcProject in ifc manager have only archicad ifc id - is this a bug? Or is there a way to contact them? As far as I know - archicad ifc id navigation is not possible