SetPropertyType

This function sets the type of the property. This is only allowed if the type of the property was not set before.

The following values are possible for propertyType:
    OBJECTPROPERTY_TYPE The property is an Object Property
    DATATYPEPROPERTY_TYPE_BOOLEAN The property is an Datatype Property of type Boolean
    DATATYPEPROPERTY_TYPE_CHAR The property is an Datatype Property of type Char
    DATATYPEPROPERTY_TYPE_INTEGER The property is an Datatype Property of type Integer
    DATATYPEPROPERTY_TYPE_DOUBLE The property is an Datatype Property of type Double
The return value of this call is GetPropertyType/Ex applied after applying the type, normally this corresponds with the propertyType requested to be set unless the property already has a different propertyType set before.

Syntax

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

[DllImport(enginedll, EntryPoint = "SetPropertyType")]
public static extern Int64 SetPropertyType(Int64 rdfProperty, Int64 propertyType);    

Property rdfProperty

Size: 64 bit / 8 byte (value)
This attribute represents a handle to the property, this can be either a datatype property (attribute), an object property (relation) or non-defined property. The handle will be static during the life-time of the model, when the model (or part of it) is saved and opened again, the handle will most probably be different.

Property propertyType

Size: 64 bit / 8 byte (value)
The type of the property, either not defined or a datatype property (attribute) or an object property (relation). The following values are possible for propertyType:
    0 [default] not defined property type
    OBJECTPROPERTY_TYPE The property is an Object Property
    DATATYPEPROPERTY_TYPE_BOOLEAN The property is an Datatype Property of type Boolean
    DATATYPEPROPERTY_TYPE_CHAR The property is an Datatype Property of type Char
    DATATYPEPROPERTY_TYPE_INTEGER The property is an Datatype Property of type Integer
    DATATYPEPROPERTY_TYPE_DOUBLE The property is an Datatype Property of type Double