engiGetEntityArgumentType

This call can be used to retrieve the type of the n-th argument of the given entity. In case of a select argument no relevant information is given by this call as it depends on the instance. Arguments of parent entities are included in the index. Both direct and inverse arguments are included.

Syntax

//   Visual Studio for Windows
public:
void __declspec(dllexport) __stdcall engiGetEntityArgumentType(
            __int64 entity,
            __int64 index,
            __int64 * argumentType
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
void engiGetEntityArgumentType(
            int64_t entity,
            int64_t index,
            int64_t * argumentType
        );    

Property entity

Size: 64 bit / 8 byte (value)
Handle of an entity (schema item/class), for example IFCWALLSTANDARDCASE as defined in IFC4.exp.

Property index

Size: 64 bit / 8 byte (value)
Integer value equal or larger then 0 and smaller than given maximum length of array/list/aggregation used.

Property argumentType

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

Examples

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

__int64 WriteEntityStructure(__int64 ifcEntity)
{
    if  (ifcEntity) {
        //
        //  Iterate over the parents
        //
        __int64	attributeCnt = WriteEntityStructure(engiGetEntityParent(ifcEntity));

        //
        //  Print Entity name
        //
        char    * entityName = 0;
        engiGetEntityName(ifcEntity, sdaiSTRING, &entityName);
        std::cout << "Entity  " << entityName << std::endl;

        //
        //  Walk over attributes
        //
        while  (attributeCnt < engiGetEntityNoArguments(ifcEntity)) {
            char    * attributeName = 0;
            __int64 attributeType = 0;
            engiGetEntityArgumentName(ifcEntity, attributeCnt, sdaiSTRING, &attributeName);
            engiGetEntityArgumentType(ifcEntity, attributeCnt, &attributeType);

            std::cout << "  " << attributeName << "  ";
            switch  (attributeType) {
                case  sdaiSTRING:
                    std::cout << "STRING";
                    break;

                ...

                default:
                    break;
            }
            std::cout << std::endl;

            attributeCnt++;
        }

        return  attributeCnt;
    }

    return  0;
}