Syntax
public const string stepenginedll = @"stepengine.dll"; [DllImport(stepenginedll, EntryPoint = "engiGetEntityName")] public static extern IntPtr engiGetEntityName(int_t entity, int_t valueType, out IntPtr entityName); public static string engiGetEntityName(int_t entity) { IntPtr entityName = IntPtr.Zero; engiGetEntityName(entity, sdaiSTRING, out entityName); return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(entityName); }
Property entity
Size: 32 bit / 4 byte (value)Property valueType
Size: 32 bit / 4 byte (value)Property entityName
Size: 32 bit / 4 byte (reference)???.
Example (based on pure API calls)
Here you can find code snippets that show how the API call engiGetEntityName 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; }