...

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiPrepend, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiPrepend but valid for all put-functions)

valueType               C/C++                                                       C#

sdaiINTEGER             int_t val = 123;                                            int_t val = 123;
                        sdaiPrepend (aggregate, sdaiINTEGER, &val);                 ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                       double val = 123.456;
                        sdaiPrepend (aggregate, sdaiREAL, &val);                    ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                 bool val = true;
                        sdaiPrepend (aggregate, sdaiBOOLEAN, &val);                 ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                     string val = "U";
                        sdaiPrepend (aggregate, sdaiLOGICAL, val);                  ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                            string val = "NOTDEFINED";
                        sdaiPrepend (aggregate, sdaiENUM, val);                     ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                            string val = "0123456ABC";
                        sdaiPrepend (aggregate, sdaiBINARY, val);                   ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                       string val = "My Simple String";
                        sdaiPrepend (aggregate, sdaiSTRING, val);                   ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                 string val = "Any Unicode String";
                        sdaiPrepend (aggregate, sdaiUNICODE, val);                  ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";  string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiPrepend (aggregate, sdaiEXPRESSSTRING, val);            ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE"); int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        sdaiPrepend (aggregate, sdaiINSTANCE, val);                 ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                    int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                      ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        sdaiPrepend (aggregate, sdaiAGGR, val);                     ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiAGGR, val);

sdaiADB                 int_t integerValue = 123;                                   int_t integerValue = 123;   
                        SdaiADB val = sdaiCreateADB (sdaiINTEGER, &integerValue);   int_t val = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref integerValue);
                        sdaiPutADBTypePath (val, 1, "IFCINTEGER");                  ifcengine.sdaiPutADBTypePath (val, 1, "IFCINTEGER");
                        sdaiPrepend (aggregate, sdaiADB, val);                      ifcengine.sdaiPrepend (aggregate, ifcengine.sdaiADB, val);  
                        sdaiDeleteADB (val);                                        ifcengine.sdaiDeleteADB (val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiAppend, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiAppend but valid for all put-functions)

valueType               C/C++                                                       C#

sdaiINTEGER             int_t val = 123;                                            int_t val = 123;
                        sdaiAppend (aggregate, sdaiINTEGER, &val);                  ifcengine.sdaiAppend (aggregate, ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                       double val = 123.456;
                        sdaiAppend (aggregate, sdaiREAL, &val);                     ifcengine.sdaiAppend (aggregate, ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                 bool val = true;
                        sdaiAppend (aggregate, sdaiBOOLEAN, &val);                  ifcengine.sdaiAppend (aggregate, ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                     string val = "U";
                        sdaiAppend (aggregate, sdaiLOGICAL, val);                   ifcengine.sdaiAppend (aggregate, ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                            string val = "NOTDEFINED";
                        sdaiAppend (aggregate, sdaiENUM, val);                      ifcengine.sdaiAppend (aggregate, ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                            string val = "0123456ABC";
                        sdaiAppend (aggregate, sdaiBINARY, val);                    ifcengine.sdaiAppend (aggregate, ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                       string val = "My Simple String";
                        sdaiAppend (aggregate, sdaiSTRING, val);                    ifcengine.sdaiAppend (aggregate, ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                 string val = "Any Unicode String";
                        sdaiAppend (aggregate, sdaiUNICODE, val);                   ifcengine.sdaiAppend (aggregate, ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";  string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiAppend (aggregate, sdaiEXPRESSSTRING, val);             ifcengine.sdaiAppend (aggregate, ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE"); int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        sdaiAppend (aggregate, sdaiINSTANCE, val);                  ifcengine.sdaiAppend (aggregate, ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                    int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                      ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        sdaiAppend (aggregate, sdaiAGGR, val);                      ifcengine.sdaiAppend (aggregate, ifcengine.sdaiAGGR, val);

sdaiADB                 int_t integerValue = 123;                                   int_t integerValue = 123;   
                        SdaiADB val = sdaiCreateADB (sdaiINTEGER, &integerValue);   int_t val = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref integerValue);
                        sdaiPutADBTypePath (val, 1, "IFCINTEGER");                  ifcengine.sdaiPutADBTypePath (val, 1, "IFCINTEGER");
                        sdaiAppend (aggregate, sdaiADB, val);                       ifcengine.sdaiAppend (aggregate, ifcengine.sdaiADB, val);   
                        sdaiDeleteADB (val);                                        ifcengine.sdaiDeleteADB (val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiAdd, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiAdd but valid for all put-functions)

valueType               C/C++                                                       C#

sdaiINTEGER             int_t val = 123;                                            int_t val = 123;
                        sdaiAdd (aggregate, sdaiINTEGER, &val);                     ifcengine.sdaiAdd (aggregate, ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                       double val = 123.456;
                        sdaiAdd (aggregate, sdaiREAL, &val);                        ifcengine.sdaiAdd (aggregate, ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                 bool val = true;
                        sdaiAdd (aggregate, sdaiBOOLEAN, &val);                     ifcengine.sdaiAdd (aggregate, ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                     string val = "U";
                        sdaiAdd (aggregate, sdaiLOGICAL, val);                      ifcengine.sdaiAdd (aggregate, ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                            string val = "NOTDEFINED";
                        sdaiAdd (aggregate, sdaiENUM, val);                         ifcengine.sdaiAdd (aggregate, ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                            string val = "0123456ABC";
                        sdaiAdd (aggregate, sdaiBINARY, val);                       ifcengine.sdaiAdd (aggregate, ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                       string val = "My Simple String";
                        sdaiAdd (aggregate, sdaiSTRING, val);                       ifcengine.sdaiAdd (aggregate, ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                 string val = "Any Unicode String";
                        sdaiAdd (aggregate, sdaiUNICODE, val);                      ifcengine.sdaiAdd (aggregate, ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";  string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiAdd (aggregate, sdaiEXPRESSSTRING, val);                ifcengine.sdaiAdd (aggregate, ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE"); int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        sdaiAdd (aggregate, sdaiINSTANCE, val);                     ifcengine.sdaiAdd (aggregate, ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                    int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                      ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        sdaiAdd (aggregate, sdaiAGGR, val);                         ifcengine.sdaiAdd (aggregate, ifcengine.sdaiAGGR, val);

sdaiADB                 int_t integerValue = 123;                                   int_t integerValue = 123;   
                        SdaiADB val = sdaiCreateADB (sdaiINTEGER, &integerValue);   int_t val = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref integerValue);
                        sdaiPutADBTypePath (val, 1, "IFCINTEGER");                  ifcengine.sdaiPutADBTypePath (val, 1, "IFCINTEGER");
                        sdaiAdd (aggregate, sdaiADB, val);                          ifcengine.sdaiAdd (aggregate, ifcengine.sdaiADB, val);  
                        sdaiDeleteADB (val);                                        ifcengine.sdaiDeleteADB (val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiInsertByIndex, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiInsertByIndex but valid for all put-functions)

valueType               C/C++                                                           C#

sdaiINTEGER             int_t val = 123;                                                int_t val = 123;
                        sdaiInsertByIndex (aggregate, index, sdaiINTEGER, &val);        ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                           double val = 123.456;
                        sdaiInsertByIndex (aggregate, index, sdaiREAL, &val);           ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                     bool val = true;
                        sdaiInsertByIndex (aggregate, index, sdaiBOOLEAN, &val);        ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                         string val = "U";
                        sdaiInsertByIndex (aggregate, index, sdaiLOGICAL, val);         ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                                string val = "NOTDEFINED";
                        sdaiInsertByIndex (aggregate, index, sdaiENUM, val);            ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                                string val = "0123456ABC";
                        sdaiInsertByIndex (aggregate, index, sdaiBINARY, val);          ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                           string val = "My Simple String";
                        sdaiInsertByIndex (aggregate, index, sdaiSTRING, val);          ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                     string val = "Any Unicode String";
                        sdaiInsertByIndex (aggregate, index, sdaiUNICODE, val);         ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";      string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiInsertByIndex (aggregate, index, sdaiEXPRESSSTRING, val);   ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE");     int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        sdaiInsertByIndex (aggregate, index, sdaiINSTANCE, val);        ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                        int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                          ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        sdaiInsertByIndex (aggregate, index, sdaiAGGR, val);            ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiAGGR, val);

sdaiADB                 int_t integerValue = 123;                                       int_t integerValue = 123;   
                        SdaiADB val = sdaiCreateADB (sdaiINTEGER, &integerValue);       int_t val = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref integerValue);
                        sdaiPutADBTypePath (val, 1, "IFCINTEGER");                      ifcengine.sdaiPutADBTypePath (val, 1, "IFCINTEGER");
                        sdaiInsertByIndex (aggregate, index, sdaiADB, val);             ifcengine.sdaiInsertByIndex (aggregate, index, ifcengine.sdaiADB, val); 
                        sdaiDeleteADB (val);                                            ifcengine.sdaiDeleteADB (val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiInsertBefore, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiInsertBefore but valid for all put-functions)

valueType               C/C++                                                       C#

sdaiINTEGER             int_t val = 123;                                            int_t val = 123;
                        sdaiInsertBefore (iterator, sdaiINTEGER, &val);             ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                       double val = 123.456;
                        sdaiInsertBefore (iterator, sdaiREAL, &val);                ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                 bool val = true;
                        sdaiInsertBefore (iterator, sdaiBOOLEAN, &val);             ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                     string val = "U";
                        sdaiInsertBefore (iterator, sdaiLOGICAL, val);              ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                            string val = "NOTDEFINED";
                        sdaiInsertBefore (iterator, sdaiENUM, val);                 ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                            string val = "0123456ABC";
                        sdaiInsertBefore (iterator, sdaiBINARY, val);               ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                       string val = "My Simple String";
                        sdaiInsertBefore (iterator, sdaiSTRING, val);               ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                 string val = "Any Unicode String";
                        sdaiInsertBefore (iterator, sdaiUNICODE, val);              ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";  string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiInsertBefore (iterator, sdaiEXPRESSSTRING, val);        ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE"); int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        sdaiInsertBefore (iterator, sdaiINSTANCE, val);             ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                    int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                      ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        sdaiInsertBefore (iterator, sdaiAGGR, val);                 ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiAGGR, val);

sdaiADB                 int_t integerValue = 123;                                   int_t integerValue = 123;   
                        SdaiADB val = sdaiCreateADB (sdaiINTEGER, &integerValue);   int_t val = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref integerValue);
                        sdaiPutADBTypePath (val, 1, "IFCINTEGER");                  ifcengine.sdaiPutADBTypePath (val, 1, "IFCINTEGER");
                        sdaiInsertBefore (iterator, sdaiADB, val);                  ifcengine.sdaiInsertBefore (iterator, ifcengine.sdaiADB, val);  
                        sdaiDeleteADB (val);                                        ifcengine.sdaiDeleteADB (val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiInsertAfter, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiInsertAfter but valid for all put-functions)

valueType               C/C++                                                       C#

sdaiINTEGER             int_t val = 123;                                            int_t val = 123;
                        sdaiInsertAfter (iterator, sdaiINTEGER, &val);              ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                       double val = 123.456;
                        sdaiInsertAfter (iterator, sdaiREAL, &val);                 ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                 bool val = true;
                        sdaiInsertAfter (iterator, sdaiBOOLEAN, &val);              ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                     string val = "U";
                        sdaiInsertAfter (iterator, sdaiLOGICAL, val);               ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                            string val = "NOTDEFINED";
                        sdaiInsertAfter (iterator, sdaiENUM, val);                  ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                            string val = "0123456ABC";
                        sdaiInsertAfter (iterator, sdaiBINARY, val);                ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                       string val = "My Simple String";
                        sdaiInsertAfter (iterator, sdaiSTRING, val);                ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                 string val = "Any Unicode String";
                        sdaiInsertAfter (iterator, sdaiUNICODE, val);               ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";  string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiInsertAfter (iterator, sdaiEXPRESSSTRING, val);         ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE"); int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        sdaiInsertAfter (iterator, sdaiINSTANCE, val);              ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                    int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                      ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        sdaiInsertAfter (iterator, sdaiAGGR, val);                  ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiAGGR, val);

sdaiADB                 int_t integerValue = 123;                                   int_t integerValue = 123;   
                        SdaiADB val = sdaiCreateADB (sdaiINTEGER, &integerValue);   int_t val = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref integerValue);
                        sdaiPutADBTypePath (val, 1, "IFCINTEGER");                  ifcengine.sdaiPutADBTypePath (val, 1, "IFCINTEGER");
                        sdaiInsertAfter (iterator, sdaiADB, val);                   ifcengine.sdaiInsertAfter (iterator, ifcengine.sdaiADB, val);   
                        sdaiDeleteADB (val);                                        ifcengine.sdaiDeleteADB (val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiCreateADB, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiCreateADB but valid for all put-functions)

valueType               C/C++                                                       C#

sdaiINTEGER             int_t val = 123;                                            int_t val = 123;
                        SdaiADB adb = sdaiCreateADB (sdaiINTEGER, &val);            int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                       double val = 123.456;
                        SdaiADB adb = sdaiCreateADB (sdaiREAL, &val);               int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                 bool val = true;
                        SdaiADB adb = sdaiCreateADB (sdaiBOOLEAN, &val);            int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                     string val = "U";
                        SdaiADB adb = sdaiCreateADB (sdaiLOGICAL, val);             int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                            string val = "NOTDEFINED";
                        SdaiADB adb = sdaiCreateADB (sdaiENUM, val);                int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                            string val = "0123456ABC";
                        SdaiADB adb = sdaiCreateADB (sdaiBINARY, val);              int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                       string val = "My Simple String";
                        SdaiADB adb = sdaiCreateADB (sdaiSTRING, val);              int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                 string val = "Any Unicode String";
                        SdaiADB adb = sdaiCreateADB (sdaiUNICODE, val);             int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";  string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        SdaiADB adb = sdaiCreateADB (sdaiEXPRESSSTRING, val);       int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE"); int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        SdaiADB adb = sdaiCreateADB (sdaiINSTANCE, val);            int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                    int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                      ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        SdaiADB adb = sdaiCreateADB (sdaiAGGR, val);                int_t adb = ifcengine.sdaiCreateADB (ifcengine.sdaiAGGR, val);

sdaiADB                 not applicable
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

This call creates an aggregation. The instance has to be present, the attribute argument can be empty (0) in case the aggregation is an nested aggregation for this specific instance, preferred use would be use of sdaiCreateNestedAggr in such a case.

This call creates an aggregation. The instance has to be present, the attributeName argument can be NULL (0) in case the aggregation is an nested aggregation for this specific instance, preferred use would be use of sdaiCreateNestedAggr in such a case. Technically sdaiCreateAggrBN will transform into the following call

    (attributeName) ?
        sdaiCreateAggr(
                instance,
                sdaiGetAttrDefinition(
                        sdaiGetInstanceType(
                                instance
                            ),
                        attributeName
                    )
            ) :
        sdaiCreateAggr(
                instance,
                nullptr
            );

...

...

This call creates an aggregation within an aggregation.

The function creates an aggregate instance and replaces the existing member of the specified ordered aggregate instance referenced by the specified index.

The function creates an aggregate instance as a member of the specified ordered aggregate instance. The newly created aggregate is inserted into the aggregate at the position referenced by the specified index.

The function creates an aggregate instance replacing the current member of the aggregate instance referenced by the specified iterator.

The function creates an aggregate instance as a member of a list instance. The newly created aggregate is inserted into the list instance before the member referenced by the specified iterator.

The function creates an aggregate instance as a member of a list instance. The newly created aggregate is inserted into the list instance after the member referenced by the specified iterator.

The CreateNestedAggrABD function creates an aggregate instance as a member of (an unordered) aggregate instance in the case where the type of the aggregate to create is a SELECT TYPE and ambiguous. Input ADB is expected to have type path. The function sets the value of the ADB with the identifier of the newly created aggregate instance.

The function creates an aggregate instance and replaces the existing member of the specified ordered aggregate instance referenced by the specified index. Input ADB is expected to have type path. The function sets the value of the ADB with the identifier of the newly created aggregate instance.

The function creates an aggregate instance as member of the specified ordered aggregate instance. The newly created aggregate is inserted into the aggregate at the position referenced by the specified index. Input ADB is expected to have type path. The function sets the value of the ADB with the identifier of the newly created aggregate instance.

The function creates an aggregate instance replacing the current member of the aggregate instance referenced by the specified iterator where the type of the aggregate to create is a SELECT TYPE and ambiguous, Input ADB is expected to have type path. The function sets the value of the ADB with the identifier of the newly created aggregate instance.

The function creates an aggregate instance as a member of a list instance where the type of the aggregate to create is a SELECT TYPE and ambiguous. The newly created aggregate is inserted into the list instance before the member referenced by the specified iterator. Input ADB is expected to have type path. The function sets the value of the ADB with the identifier of the newly created aggregate instance.

The function creates an aggregate instance as a member of a list instance where the type of the aggregate to create is a SELECT TYPE and ambiguous. The newly created aggregate is inserted into the list instance after the member referenced by the specified iterator. Input ADB is expected to have type path. The function sets the value of the ADB with the identifier of the newly created aggregate instance.

The function removes the member of the specified list referenced by the specified index.

The function removes the current member of an aggregate instance, that is not an array, referenced by the specified iterator. After executing the function, the iterator position set as if the sdaiNext function had been invoked before the member was removed.

The function removes one occurrence of the specified value from the specified unordered aggregate instance. Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiRemove, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiRemove but valid for all put-functions)

valueType               C/C++                                                       C#

sdaiINTEGER             int_t val = 123;                                            int_t val = 123;
                        sdaiRemove (aggregate, sdaiINTEGER, &val);                  ifcengine.sdaiRemove (aggregate, ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                       double val = 123.456;
                        sdaiRemove (aggregate, sdaiREAL, &val);                     ifcengine.sdaiRemove (aggregate, ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                 bool val = true;
                        sdaiRemove (aggregate, sdaiBOOLEAN, &val);                  ifcengine.sdaiRemove (aggregate, ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                     string val = "U";
                        sdaiRemove (aggregate, sdaiLOGICAL, val);                   ifcengine.sdaiRemove (aggregate, ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                            string val = "NOTDEFINED";
                        sdaiRemove (aggregate, sdaiENUM, val);                      ifcengine.sdaiRemove (aggregate, ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                            string val = "0123456ABC";
                        sdaiRemove (aggregate, sdaiBINARY, val);                    ifcengine.sdaiRemove (aggregate, ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                       string val = "My Simple String";
                        sdaiRemove (aggregate, sdaiSTRING, val);                    ifcengine.sdaiRemove (aggregate, ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                 string val = "Any Unicode String";
                        sdaiRemove (aggregate, sdaiUNICODE, val);                   ifcengine.sdaiRemove (aggregate, ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";  string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiRemove (aggregate, sdaiEXPRESSSTRING, val);             ifcengine.sdaiRemove (aggregate, ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = ...                                      int_t val = ...
                        sdaiRemove (aggregate, sdaiINSTANCE, val);                  ifcengine.sdaiRemove (aggregate, ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = ...                                          int_t val = ...
                        sdaiRemove (aggregate, sdaiAGGR, val);                      ifcengine.sdaiRemove (aggregate, ifcengine.sdaiAGGR, val);

sdaiADB                 SdaiADB val = ...                                           int_t val = ...
                        sdaiRemove (aggregate, sdaiADB, val);                       ifcengine.sdaiRemove (aggregate, ifcengine.sdaiADB, val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

The function tests whether the member of the specified array referenced by the specified index position has a value.

The function tests whether the member of the specified array referenced by the specified index position has a value.

This call creates an instance of the given entity.

This call creates an instance of the given entity. Technically it will transform into the following call

    sdaiCreateInstance(
            model,
            sdaiGetEntity(
                    model,
                    entityName
                )
        );

This call creates a new application instance of the specified type, as determined by a constructed entity type that is made up of the supplied simple entity types, in the specified SDAI model.

This call creates a new application instance of the specified type, as determined by a constructed entity type that is made up of the supplied simple entity types, in the specified SDAI model.

This call will delete an existing instance.

...

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiPutAttr, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiPutAttr but valid for all put-functions)

valueType               C/C++                                                       C#

sdaiINTEGER             int_t val = 123;                                            int_t val = 123;
                        sdaiPutAttr (instance, attribute, sdaiINTEGER, &val);       ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                       double val = 123.456;
                        sdaiPutAttr (instance, attribute, sdaiREAL, &val);          ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                 bool val = true;
                        sdaiPutAttr (instance, attribute, sdaiBOOLEAN, &val);       ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                     string val = "U";
                        sdaiPutAttr (instance, attribute, sdaiLOGICAL, val);        ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                            string val = "NOTDEFINED";
                        sdaiPutAttr (instance, attribute, sdaiENUM, val);           ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                            string val = "0123456ABC";
                        sdaiPutAttr (instance, attribute, sdaiBINARY, val);         ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                       string val = "My Simple String";
                        sdaiPutAttr (instance, attribute, sdaiSTRING, val);         ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                 string val = "Any Unicode String";
                        sdaiPutAttr (instance, attribute, sdaiUNICODE, val);        ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";  string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiPutAttr (instance, attribute, sdaiEXPRESSSTRING, val);  ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE"); int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        sdaiPutAttr (instance, attribute, sdaiINSTANCE, val);       ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                    int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                      ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        sdaiPutAttr (instance, attribute, sdaiAGGR, val);           ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiAGGR, val);

sdaiADB                 int_t integerValue = 123;                                   int_t integerValue = 123;   
                        SdaiADB val = sdaiCreateADB (sdaiINTEGER, &integerValue);   int_t val = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref integerValue);
                        sdaiPutADBTypePath (val, 1, "IFCINTEGER");                  ifcengine.sdaiPutADBTypePath (val, 1, "IFCINTEGER");
                        sdaiPutAttr (instance, attribute, sdaiADB, val);            ifcengine.sdaiPutAttr (instance, attribute, ifcengine.sdaiADB, val);    
                        sdaiDeleteADB (val);                                        ifcengine.sdaiDeleteADB (val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiPutAttrBN, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiPutAttrBN but valid for all put-functions)

valueType               C/C++                                                           C#

sdaiINTEGER             int_t val = 123;                                                int_t val = 123;
                        sdaiPutAttrBN (instance, "attrName", sdaiINTEGER, &val);        ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                           double val = 123.456;
                        sdaiPutAttrBN (instance, "attrName", sdaiREAL, &val);           ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                     bool val = true;
                        sdaiPutAttrBN (instance, "attrName", sdaiBOOLEAN, &val);        ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                         string val = "U";
                        sdaiPutAttrBN (instance, "attrName", sdaiLOGICAL, val);         ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                                string val = "NOTDEFINED";
                        sdaiPutAttrBN (instance, "attrName", sdaiENUM, val);            ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                                string val = "0123456ABC";
                        sdaiPutAttrBN (instance, "attrName", sdaiBINARY, val);          ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                           string val = "My Simple String";
                        sdaiPutAttrBN (instance, "attrName", sdaiSTRING, val);          ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                     string val = "Any Unicode String";
                        sdaiPutAttrBN (instance, "attrName", sdaiUNICODE, val);         ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";      string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiPutAttrBN (instance, "attrName", sdaiEXPRESSSTRING, val);   ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE");     int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        sdaiPutAttrBN (instance, "attrName", sdaiINSTANCE, val);        ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                        int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                          ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        sdaiPutAttrBN (instance, "attrName", sdaiAGGR, val);            ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiAGGR, val);

sdaiADB                 int_t integerValue = 123;                                       int_t integerValue = 123;   
                        SdaiADB val = sdaiCreateADB (sdaiINTEGER, &integerValue);       int_t val = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref integerValue);
                        sdaiPutADBTypePath (val, 1, "IFCINTEGER");                      ifcengine.sdaiPutADBTypePath (val, 1, "IFCINTEGER");
                        sdaiPutAttrBN (instance, "attrName", sdaiADB, val);             ifcengine.sdaiPutAttrBN (instance, "attrName", ifcengine.sdaiADB, val); 
                        sdaiDeleteADB (val);                                            ifcengine.sdaiDeleteADB (val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .
Technically sdaiPutAttrBN will transform into the following call
    sdaiPutAttr(
            instance,
            sdaiGetAttrDefinition(
                    sdaiGetInstanceType(
                            instance
                        ),
                    attributeName
                ),
            valueType,
            value
        );

This call removes all data from a specific attribute for the given instance.

This call removes all data from a specific attribute for the given instance. Technically it will transform into the following call

    sdaiUnsetAttr(
            instance,
            sdaiGetAttrDefinition(
                    sdaiGetInstanceType(
                            instance
                        ),
                    attributeName
                )
        );

This call can be used to add a comment to an instance when exporting the content. The comment is available in the exported/saved IFC file.

...

...

Technically it will transform into the following call

    sdaiGetAttrDefinition(
            sdaiGetInstanceType(
                    instance
                ),
            attributeName
        );

This call creates an instance at a specific given express ID, the instance is only created if the express ID was not used yet.

This call creates an instance at a specific given express ID, the instance is only created if the express ID was not used yet.

This function creates an iterator associated with the specified aggregate instance. The iterator is positioned as if the sdaiBeginning function had been executed such that so that no member of the aggregate is referenced as the current member.

This function deletes the specified iterator.

The function positions the iterator at the beginning of its associated aggregate instance such that there is no current member.

This function positions the iterator to the succeeding member of the associated aggregate instance.

This function positions the specified iterator so that the preceding member of its subject ordered aggregate instance shall become the current member. If the iterator is at the end of the aggregate, the last member becomes the current member. If the iterator is at the beginning of the aggregate no repositioning occur. If the iterator references the first member of the aggregate, the iterator is set at the beginning so there is no current member.

This function positions the specified iterator at the end of the ordered aggregate instance members such that there is no current member.

The function determines whether the specified primitive or instance value is contained in the aggregate. In the case of aggregate members represented by ADBs, both the data value and data type are compared. Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiIsMember, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiIsMember but valid for all put-functions)

valueType               C/C++                                                       C#

sdaiINTEGER             int_t val = 123;                                            int_t val = 123;
                        sdaiIsMember (sdaiINTEGER, &val);                           ifcengine.sdaiIsMember (ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                       double val = 123.456;
                        sdaiIsMember (sdaiREAL, &val);                              ifcengine.sdaiIsMember (ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                 bool val = true;
                        sdaiIsMember (sdaiBOOLEAN, &val);                           ifcengine.sdaiIsMember (ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                     string val = "U";
                        sdaiIsMember (sdaiLOGICAL, val);                            ifcengine.sdaiIsMember (ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                            string val = "NOTDEFINED";
                        sdaiIsMember (sdaiENUM, val);                               ifcengine.sdaiIsMember (ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                            string val = "0123456ABC";
                        sdaiIsMember (sdaiBINARY, val);                             ifcengine.sdaiIsMember (ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                       string val = "My Simple String";
                        sdaiIsMember (sdaiSTRING, val);                             ifcengine.sdaiIsMember (ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                 string val = "Any Unicode String";
                        sdaiIsMember (sdaiUNICODE, val);                            ifcengine.sdaiIsMember (ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";  string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiIsMember (sdaiEXPRESSSTRING, val);                      ifcengine.sdaiIsMember (ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = ...                                      int_t val = ...
                        sdaiIsMember (sdaiINSTANCE, val);                           ifcengine.sdaiIsMember (ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = ...                                          int_t val = ...
                        sdaiIsMember (sdaiAGGR, val);                               ifcengine.sdaiIsMember (ifcengine.sdaiAGGR, val);

sdaiADB                 SdaiADB val = ...                                           int_t val = ...
                        sdaiIsMember (sdaiADB, val);                                ifcengine.sdaiIsMember (ifcengine.sdaiADB, val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

The function returns the current value of the real precision, the string width, or the binary width for the current member referenced by the specified iterator.

The function returns the current value of the real precision, the string width, or the binary width of the aggregate element at the specified index position in the specified ordered aggregate instance.

The function returns the current value of the lower bound, or index, of the specified aggregate instance.

The function returns the current value of the upper bound, or index, of the specified aggregate instance.

The function returns the value of the lower index of the specified array instance when it was created.

The function returns the value of the upper index of the specified array instance when it was created.

The function restores the unset (not assigned a value) status of the member of the specified array at the specified index position.

The function restores the unset (not assigned a value) status of a member at the position identified by the iterator in the array associated with the iterator.

The function resizes the specified array instance setting the lower, or upper index, or both, based upon the current population of the application schema.

The function shall resizes the specified array instance setting the lower and upper index with the specified values.

The function enables calculation of derived attributes for sdaiGetAttr(BN) and other get value functions and dynamic aggregation indexes. Returns success flag.

The function evaluates and replaces all * with values, optionally can handle $ values as derived attributes.

The function checks if instances of the specified entity are complex instances. You can use engiGetEntityParentEx to list components.

This call sets the segmentation for any curved part of an object in case it is defined by a circle, ellipse, nurbs etc. If segmentationParts is set to 0 it will fallback on the default setting (i.e. 36), it makes sense to change the segmentation depending on the entity type that is visualized. in case segmentationLength is non-zero, this is the maximum length (in file length unit definition) of a segment For example a slightly curved wall with large size will get much more precise segmentation as the segmentLength will force the segmentation for the wall to increase.

This returns the set values for segmentationParts and segmentationLength. Both attributes are optional. The values can be changed through the API call setSegmentation(). The default values are segmentationParts = 36 segmentationLength = 0.

...

...