Returns a handle to the objectTypeProperty or dataTypeProperty as stored inside. When the property does not exist yet and the name is unique the property will be created on-the-fly and the handle will be returned. When the name is not unique and given to a class or instance 0 will be returned.


//   Visual Studio for Windows
__int64 __declspec(dllexport) __stdcall GetPropertyByName(
            __int64        model,
            const char      * rdfPropertyName

//   Linux, OS-X and non-Visual Studio Windows solutions
int64_t GetPropertyByName(
            int64_t        model,
            const char      * rdfPropertyName

Property model

Size: 64 bit / 8 byte (value)

Property rdfPropertyName

Size: 64 bit / 8 byte (reference)
the name of the rdfProperty


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

__int64 rdfModel = CreateModel();

if (rdfModel) {
    __int64 classArc3D = GetClassByName(rdfModel, "Arc3D");

    __int64 propertyRadius = GetPropertyByName(rdfModel, "radius"),
            propertyStart = GetPropertyByName(rdfModel, "start"),
            propertySize = GetPropertyByName(rdfModel, "size"),
            propertySegmentationParts = GetPropertyByName(rdfModel, "segmentationParts");

    __int64 myInstanceArc3D = CreateInstance(classArc3D, nullptr);

    double  Pi = 2. * acos(0.),
            radius = 2.1,
            start = 0.,
            size = 2. * Pi;
    __int64 segmentationParts = 36;
    SetDatatypeProperty(myInstanceArc3D, propertyRadius, &radius, 1);
    SetDatatypeProperty(myInstanceArc3D, propertyStart, &start, 1);
    SetDatatypeProperty(myInstanceArc3D, propertySize, &size, 1);
    SetDatatypeProperty(myInstanceArc3D, propertySegmentationParts, &segmentationParts, 1);

    //	The resulting model can be viewed in 3D-Editor.exe
    SaveModel(rdfModel, "c:\\myFile.bin");