GetSPFFHeaderItem
Syntax
public const string ifcenginedll = @"ifcengine.dll"; [DllImport(IFCEngineDLL, EntryPoint = "GetSPFFHeaderItem")] public static extern Int32 GetSPFFHeaderItem(int_t model, int_t itemIndex, int_t itemSubIndex, int_t valueType, out IntPtr value);
Property model
Size: 32 bit / 4 byte (value)Property itemIndex
Size: 32 bit / 4 byte (value)Property itemSubIndex
Size: 32 bit / 4 byte (value)Property valueType
Size: 32 bit / 4 byte (value)Property value
Size: 32 bit / 4 byte (reference)
Example (based on pure API calls)
Here you can find code snippits that show how the API call GetSPFFHeaderItem can be used.
using RDF; // include at least engine.cs within your solution //... using System.Runtime.InteropServices; // To support Marshal namespace abc { public class myClass { void GetHeaderDescription(Int64 model) { Int64 i = 0; IntPtr textPtr = IntPtr.Zero; if (ifcengine.GetSPFFHeaderItem(model, 0, i, ifcengine.sdaiUNICODE, out textPtr) != 0) { while (ifcengine.GetSPFFHeaderItem(model, 0, i++, ifcengine.sdaiUNICODE, out textPtr) != 0) { string text = Marshal.PtrToStringUni(textPtr); } } } void GetImplementationLevel(Int64 model) { Int64 i = 0; IntPtr textPtr = IntPtr.Zero; ifcengine.GetSPFFHeaderItem(model, 1, 0, ifcengine.sdaiUNICODE, out textPtr); string text = Marshal.PtrToStringUni(textPtr); } void GetName(Int64 model) { Int64 i = 0; IntPtr textPtr = IntPtr.Zero; ifcengine.GetSPFFHeaderItem(model, 2, 0, ifcengine.sdaiUNICODE, out textPtr); string text = Marshal.PtrToStringUni(textPtr); } void GetTimeStamp(Int64 model) { Int64 i = 0; IntPtr textPtr = IntPtr.Zero; ifcengine.GetSPFFHeaderItem(model, 3, 0, ifcengine.sdaiUNICODE, out textPtr); string text = Marshal.PtrToStringUni(textPtr); } void GetAuthor(Int64 model) { Int64 i = 0; IntPtr textPtr = IntPtr.Zero; if (ifcengine.GetSPFFHeaderItem(model, 4, i, ifcengine.sdaiUNICODE, out textPtr) != 0) { while (ifcengine.GetSPFFHeaderItem(model, 4, i++, ifcengine.sdaiUNICODE, out textPtr) != 0) { string text = Marshal.PtrToStringUni(textPtr); } } } void GetOrganization(Int64 model) { Int64 i = 0; IntPtr textPtr = IntPtr.Zero; if (ifcengine.GetSPFFHeaderItem(model, 5, i, ifcengine.sdaiUNICODE, out textPtr) != 0) { while (ifcengine.GetSPFFHeaderItem(model, 5, i++, ifcengine.sdaiUNICODE, out textPtr) != 0) { string text = Marshal.PtrToStringUni(textPtr); } } } void GetPreprocessorVersion(Int64 model) { Int64 i = 0; IntPtr textPtr = IntPtr.Zero; ifcengine.GetSPFFHeaderItem(model, 6, 0, ifcengine.sdaiUNICODE, out textPtr); string text = Marshal.PtrToStringUni(textPtr); } void GetOriginatingSystem(Int64 model) { Int64 i = 0; IntPtr textPtr = IntPtr.Zero; ifcengine.GetSPFFHeaderItem(model, 7, 0, ifcengine.sdaiUNICODE, out textPtr); string text = Marshal.PtrToStringUni(textPtr); } void GetAuthorization(Int64 model) { Int64 i = 0; IntPtr textPtr = IntPtr.Zero; ifcengine.GetSPFFHeaderItem(model, 8, 0, ifcengine.sdaiUNICODE, out textPtr); string text = Marshal.PtrToStringUni(textPtr); } void GetFileSchema(Int64 model) { Int64 i = 0; IntPtr textPtr = IntPtr.Zero; if (ifcengine.GetSPFFHeaderItem(model, 9, i, ifcengine.sdaiUNICODE, out textPtr) != 0) { while (ifcengine.GetSPFFHeaderItem(model, 9, i++, ifcengine.sdaiUNICODE, out textPtr) != 0) { string text = Marshal.PtrToStringUni(textPtr); } } } ...