sdaiPutADBTypePath
Syntax
public const string enginedll = @"engine.dll"; [DllImport(enginedll, EntryPoint = "sdaiPutADBTypePath")] public static extern void x86_sdaiPutADBTypePath(Int32 ADB, Int32 pathCount, string path); [DllImport(enginedll, EntryPoint = "sdaiPutADBTypePath")] public static extern void x64_sdaiPutADBTypePath(Int64 ADB, Int64 pathCount, string path); public static void sdaiPutADBTypePath(Int64 ADB, Int64 pathCount, string path) { if (IntPtr.Size == 4) { x86_sdaiPutADBTypePath((Int32)ADB, (Int32)pathCount, path); } else { x64_sdaiPutADBTypePath(ADB, pathCount, path); } } [DllImport(enginedll, EntryPoint = "sdaiPutADBTypePath")] public static extern void x86_sdaiPutADBTypePath(Int32 ADB, Int32 pathCount, byte[] path); [DllImport(enginedll, EntryPoint = "sdaiPutADBTypePath")] public static extern void x64_sdaiPutADBTypePath(Int64 ADB, Int64 pathCount, byte[] path); public static void sdaiPutADBTypePath(Int64 ADB, Int64 pathCount, byte[] path) { if (IntPtr.Size == 4) { x86_sdaiPutADBTypePath((Int32)ADB, (Int32)pathCount, path); } else { x64_sdaiPutADBTypePath(ADB, pathCount, path); } }
Property ADB
Size: 32 bit / 4 byte (reference)Property pathCount
Size: 32 bit / 4 byte (value)Property path
Size: 32 bit / 4 byte (reference)
Example (based on pure API calls)
Here you can find code snippits that show how the API call sdaiPutADBTypePath can be used.
using RDF; // include at least engine.cs within your solution // // #13131 = IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(1.745E-2), #31313); // #31313 = IFCSIUNIT(*, .PLANEANGLEUNIT., $, .RADIAN.); // Int64 buildSIUnitInstance(Int64 model, string UnitType, string Prefix, string Name) { // #31313 = IFCSIUNIT(*, .PLANEANGLEUNIT., $, .RADIAN.); Int64 ifcSIUnitInstance = ifcengine.sdaiCreateInstanceBN(model, "IFCSIUNIT"); ifcengine.sdaiPutAttrBN(ifcSIUnitInstance, "UnitType", ifcengine.sdaiENUM, UnitType); if (Prefix != null) { ifcengine.sdaiPutAttrBN(ifcSIUnitInstance, "Prefix", ifcengine.sdaiENUM, Prefix); } ifcengine.sdaiPutAttrBN(ifcSIUnitInstance, "Name", ifcengine.sdaiENUM, Name); return ifcSIUnitInstance; } Int64 buildMeasureWithUnitInstance(Int64 model) { Int64 valueComponentADB; double valueComponent = 0.01745; // #13131 = IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(1.745E-2), #31313); Int64 ifcMeasureWithUnitInstance = ifcengine.sdaiCreateInstanceBN(model, "IFCMEASUREWITHUNIT"); valueComponentADB = ifcengine.sdaiCreateADB(ifcengine.sdaiREAL, ref valueComponent); ifcengine.sdaiPutADBTypePath(valueComponentADB, 1, "IFCPLANEANGLEMEASURE"); ifcengine.sdaiPutAttrBN(ifcMeasureWithUnitInstance, "ValueComponent", ifcengine.sdaiADB, ref valueComponentADB); ifcengine.sdaiPutAttrBN(ifcMeasureWithUnitInstance, "UnitComponent", ifcengine.sdaiINSTANCE, buildSIUnitInstance(model, "PLANEANGLEUNIT", null, "RADIAN")); return ifcMeasureWithUnitInstance; }