engiGetAttributeType

This call is deprecated, please use call engiGetAttrType(..) instead.

Syntax

public const string enginedll = @"engine.dll";

[DllImport(enginedll, EntryPoint = "engiGetAttributeType")]
public static extern Int64 x86_engiGetAttributeType(Int32 attribute);

[DllImport(enginedll, EntryPoint = "engiGetAttributeType")]
public static extern Int64 x64_engiGetAttributeType(Int64 attribute);

public static Int64 engiGetAttributeType(Int64 attribute)
		{
			if (IntPtr.Size == 4)
			{
				var _result = x86_engiGetAttributeType((Int32)attribute);
				return _result;
			}
			else
			{
				return x64_engiGetAttributeType(attribute);
			}
		}    

Property attribute

Size: 64 bit / 8 byte (reference)
...

Example (based on pure API calls)

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

using RDF;      //  include at least engine.cs within your solution

Int64 WriteEntityStructure(Int64 ifcEntity)
{
    if (ifcEntity != 0)
    {
        //
        //  Iterate over the parents
        //
        Int64 attributeCnt = WriteEntityStructure(ifcengine.engiGetEntityParent(ifcEntity));

        //
        //  Print Entity name
        //
        IntPtr entityName = ifcengine.engiGetEntityName(ifcEntity);
        Console.WriteLine("Entity  " + entityName);

        //
        //  Walk over attributes
        //
        while  (attributeCnt < ifcengine.engiGetEntityNoArguments(ifcEntity)) {
            string attributeName = ifcengine.engiGetEntityArgumentName(ifcEntity, attributeCnt);
            Int64 attributeType = 0;
            ifcengine.engiGetEntityArgumentType(ifcEntity, attributeCnt, out attributeType);

            Console.Write("  " + attributeName + "  ");
            switch  (attributeType) {
                case  ifcengine.sdaiSTRING:
                    Console.WriteLine("STRING");
                    break;

                ...

                default:
                    break;
            }

            attributeCnt++;
        }

        return  attributeCnt;
    }

    return  0;
}