engiGetEntityParent
Syntax
public const string enginedll = @"engine.dll"; [DllImport(enginedll, EntryPoint = "engiGetEntityParent")] public static extern Int32 x86_engiGetEntityParent(Int32 entity); [DllImport(enginedll, EntryPoint = "engiGetEntityParent")] public static extern Int32 x64_engiGetEntityParent(Int64 entity); public static Int32 engiGetEntityParent(Int64 entity) { if (IntPtr.Size == 4) { var _result = x86_engiGetEntityParent((Int32)entity); return _result; } else { return x64_engiGetEntityParent(entity); } }
Property entity
Size: 32 bit / 4 byte (value)
Example (based on pure API calls)
Here you can find code snippits that show how the API call engiGetEntityParent can be used.
using RDF; // include at least engine.cs within your solution Int64 WriteEntityStructure(Int64 ifcEntity) { if (ifcEntity != 0) { // // Iterate over the parents // Int64 attributeCnt = WriteEntityStructure(ifcengine.engiGetEntityParent(ifcEntity)); // // Print Entity name // IntPtr entityName = ifcengine.engiGetEntityName(ifcEntity); Console.WriteLine("Entity " + entityName); // // Walk over attributes // while (attributeCnt < ifcengine.engiGetEntityNoArguments(ifcEntity)) { string attributeName = ifcengine.engiGetEntityArgumentName(ifcEntity, attributeCnt); Int64 attributeType = 0; ifcengine.engiGetEntityArgumentType(ifcEntity, attributeCnt, out attributeType); Console.Write(" " + attributeName + " "); switch (attributeType) { case ifcengine.sdaiSTRING: Console.WriteLine("STRING"); break; ... default: break; } attributeCnt++; } return attributeCnt; } return 0; }