sdaiPutAggrByIndex
Table 1 – Required value buffer depending on valueType (on the example of sdaiPutAggrByIndex but valid for all put-functions)
valueType C/C++ C#
sdaiINTEGER int_t val = 123; int_t val = 123;
sdaiPutAggrByIndex (aggregate, index, sdaiINTEGER, &val); ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiINTEGER, ref val);
sdaiREAL or sdaiNUMBER double val = 123.456; double val = 123.456;
sdaiPutAggrByIndex (aggregate, index, sdaiREAL, &val); ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiREAL, ref val);
sdaiBOOLEAN SdaiBoolean val = sdaiTRUE; bool val = true;
sdaiPutAggrByIndex (aggregate, index, sdaiBOOLEAN, &val); ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiBOOLEAN, ref val);
sdaiLOGICAL const TCHAR* val = "U"; string val = "U";
sdaiPutAggrByIndex (aggregate, index, sdaiLOGICAL, val); ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiLOGICAL, val);
sdaiENUM const TCHAR* val = "NOTDEFINED"; string val = "NOTDEFINED";
sdaiPutAggrByIndex (aggregate, index, sdaiENUM, val); ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiENUM, val);
sdaiBINARY const TCHAR* val = "0123456ABC"; string val = "0123456ABC";
sdaiPutAggrByIndex (aggregate, index, sdaiBINARY, val); ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiBINARY, val);
sdaiSTRING const char* val = "My Simple String"; string val = "My Simple String";
sdaiPutAggrByIndex (aggregate, index, sdaiSTRING, val); ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiSTRING, val);
sdaiUNICODE const wchar_t* val = L"Any Unicode String"; string val = "Any Unicode String";
sdaiPutAggrByIndex (aggregate, index, sdaiUNICODE, val); ifcengine.sdaiPutAggrByIndex (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\\";
sdaiPutAggrByIndex (aggregate, index, sdaiEXPRESSSTRING, val); ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiEXPRESSSTRING, val);
sdaiINSTANCE SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE"); int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
sdaiPutAggrByIndex (aggregate, index, sdaiINSTANCE, val); ifcengine.sdaiPutAggrByIndex (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);
sdaiPutAggrByIndex (aggregate, index, sdaiAGGR, val); ifcengine.sdaiPutAggrByIndex (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");
sdaiPutAggrByIndex (aggregate, index, sdaiADB, val); ifcengine.sdaiPutAggrByIndex (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 .
Syntax
public const string ifcenginedll = @"ifcengine.dll"; [DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAggrByIndex")] public static extern void sdaiPutAggrByIndex(int_t aggregate, int_t index, int_t valueType, ref bool value); [DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAggrByIndex")] public static extern void sdaiPutAggrByIndex(int_t aggregate, int_t index, int_t valueType, ref int_t value); [DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAggrByIndex")] public static extern void sdaiPutAggrByIndex(int_t aggregate, int_t index, int_t valueType, int_t value); [DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAggrByIndex")] public static extern void sdaiPutAggrByIndex(int_t aggregate, int_t index, int_t valueType, ref double value); [DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAggrByIndex")] public static extern void sdaiPutAggrByIndex(int_t aggregate, int_t index, int_t valueType, ref IntPtr value); [DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAggrByIndex")] public static extern void sdaiPutAggrByIndex(int_t aggregate, int_t index, int_t valueType, byte[] value); [DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAggrByIndex")] public static extern void sdaiPutAggrByIndex(int_t aggregate, int_t index, int_t valueType, string value);