sdaiGetEntityExtentBN
sdaiGetEntityExtent(
model,
sdaiGetEntity(
model,
entityName
)
);
Syntax
public const string enginedll = @"engine.dll"; [DllImport(enginedll, EntryPoint = "sdaiGetEntityExtentBN")] public static extern Int64 x86_sdaiGetEntityExtentBN(Int32 model, string entityName); [DllImport(enginedll, EntryPoint = "sdaiGetEntityExtentBN")] public static extern Int64 x64_sdaiGetEntityExtentBN(Int64 model, string entityName); public static Int64 sdaiGetEntityExtentBN(Int64 model, string entityName) { if (IntPtr.Size == 4) { var _result = x86_sdaiGetEntityExtentBN((Int32)model, entityName); return _result; } else { return x64_sdaiGetEntityExtentBN(model, entityName); } } [DllImport(enginedll, EntryPoint = "sdaiGetEntityExtentBN")] public static extern Int64 x86_sdaiGetEntityExtentBN(Int32 model, byte[] entityName); [DllImport(enginedll, EntryPoint = "sdaiGetEntityExtentBN")] public static extern Int64 x64_sdaiGetEntityExtentBN(Int64 model, byte[] entityName); public static Int64 sdaiGetEntityExtentBN(Int64 model, byte[] entityName) { if (IntPtr.Size == 4) { var _result = x86_sdaiGetEntityExtentBN((Int32)model, entityName); return _result; } else { return x64_sdaiGetEntityExtentBN(model, entityName); } }
Property model
Size: 64 bit / 8 byte (value)Property entityName
Size: 64 bit / 8 byte (reference)
Example (based on pure API calls)
Here you can find code snippits that show how the API call sdaiGetEntityExtentBN can be used.
using RDF; // include at least engine.cs within your solution void GetColumns(Int64 model) { Int64 ifcColumnInstances = ifcengine.sdaiGetEntityExtentBN(model, "IFCCOLUMN"), noIfcColumnInstances = ifcengine.sdaiGetMemberCount(ifcColumnInstances); if (noIfcColumnInstances != 0) { for (Int64 i = 0; i < noIfcColumnInstances; i++) { Int64 ifcColumnInstance = 0; ifcengine.sdaiGetAggrByIndex(ifcColumnInstances, i, ifcengine.sdaiINSTANCE, out ifcColumnInstance); string globalId; ifcengine.sdaiGetAttrBN(ifcColumnInstance, "GlobalId", ifcengine.sdaiUNICODE, out globalId); string name; ifcengine.sdaiGetAttrBN(ifcColumnInstance, "Name", ifcengine.sdaiUNICODE, out name); string description; ifcengine.sdaiGetAttrBN(ifcColumnInstance, "Description", ifcengine.sdaiUNICODE, out description); } } }