SetSPFFHeaderItem

...

Syntax

//   Visual Studio for Windows
public:
__int64 __declspec(dllexport) __stdcall SetSPFFHeaderItem(
            __int64 model,
            __int64 itemIndex,
            __int64 itemSubIndex,
            __int64 valueType,
            char    * value
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
int64_t SetSPFFHeaderItem(
            int64_t model,
            int64_t itemIndex,
            int64_t itemSubIndex,
            int64_t valueType,
            char    * value
        );    

Property model

Size: 64 bit / 8 byte (value)
Handle of the model containing the IFC file, this handle is needed in many other calls and given when the model is created.

Property itemIndex

Size: 64 bit / 8 byte (value)
Integer value equal or larger then 0 giving the header element index where this value is placed.

Property itemSubIndex

Size: 64 bit / 8 byte (value)
Integer value equal or larger then 0 giving the header sub element index where this value is placed.

Property valueType

Size: 64 bit / 8 byte (value)
Type of the value, for example sdaiSTRING, sdaiINSTANCE, sdaiREAL, ...

Property value

Size: 64 bit / 8 byte (reference)
Placeholder for the information, formatting depending on defined valueType.

Examples

Here you can find code snippits that show how the API call SetSPFFHeaderItem can be used.

wchar_t * ifcFileName = 0, * timeStamp = 0;

...
...

//  set Description
SetSPFFHeaderItem(model, 0, 0, sdaiUNICODE, (char*) L"ViewDefinition [CoordinationView]");
SetSPFFHeaderItem(model, 0, 1, sdaiSTRING, 0);
//  set Implementation Level
SetSPFFHeaderItem(model, 1, 0, sdaiSTRING, "2;1");
//  set Name
SetSPFFHeaderItem(model, 2, 0, sdaiUNICODE, (char*) ifcFileName);
//  set Time Stamp
SetSPFFHeaderItem(model, 3, 0, sdaiUNICODE, (char*) timeStamp);
//  set	Author
SetSPFFHeaderItem(model, 4, 0, sdaiUNICODE, L"Architect");  //  It is allowed to mix sdaiUNICODE and sdaiSTRING
SetSPFFHeaderItem(model, 4, 1, sdaiSTRING, 0);              //  as long as each call is consitent in itself.
//  set Organization
SetSPFFHeaderItem(model, 5, 0, sdaiSTRING, "Building Designer Office");
//  set Preprocessor Version
SetSPFFHeaderItem(model, 6, 0, sdaiSTRING, "IFC Engine DLL");
//  set Originating System
SetSPFFHeaderItem(model, 7, 0, sdaiSTRING, "Documentation Example");
//  set Authorization
SetSPFFHeaderItem(model, 8, 0, sdaiSTRING, "The authorising person");
//  set File Schema
SetSPFFHeaderItem(model, 9, 0, sdaiSTRING, "IFC4");
SetSPFFHeaderItem(model, 9, 1, sdaiSTRING, 0);