engiGetEntityArgumentName

This call can be used to retrieve the name of the n-th argument of the given entity. 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 engiGetEntityArgumentName(
            __int64 entity,
            __int64 index,
            __int64 valueType,
            char    ** argumentName
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
void engiGetEntityArgumentName(
            int64_t entity,
            int64_t index,
            int64_t valueType,
            char    ** argumentName
        );    

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 valueType

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

Property argumentName

Size: 64 bit / 8 byte (reference)
Name of the argument (schema attribute/property), for example Name of IFCROOT as defined in IFC4.exp.

Examples

Here you can find code snippits that show how the API call engiGetEntityArgumentName 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;
}