This function calculates the perimeter of an instance.

Note: internally the call does not store its results, any optimization based on known
    dependancies between instances need to be implemented on the client.
Note: due to internal structure using already calculated vertex buffer / index buffer does not
    give any performance benefits, in opposite to GetVolume and GetArea


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

[DllImport(enginedll, EntryPoint = "GetPerimeter")]
public static extern double GetPerimeter(Int64 owlInstance);    

Property owlInstance

Size: 64 bit / 8 byte (value)
The handle to the specific instance in the design tree. The instance handle is static within one open model but is most probably different when the same instance is opened in another model. The instance is always exactly of one unique class.

Example (based on pure API calls)

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

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


static void Main(string[] args)
    Int64   model = RDF.engine.CreateModel();

    if (model != 0)
        //  Classes
        Int64   classBox = RDF.engine.GetClassByName(model, "Box");

        //  Datatype Properties (attributes)
        Int64   propertyLength = RDF.engine.GetPropertyByName(model, "length"),
                propertyWidth = RDF.engine.GetPropertyByName(model, "width"),
                propertyHeight = RDF.engine.GetPropertyByName(model, "height");

        //  Instances (creating)
        Int64   instanceBox = RDF.engine.CreateInstance(classBox, (string) null);

        double  length = 2.8,
                width = 1.3,
                height = 1.4;

        RDF.engine.SetDatatypeProperty(instanceBox, propertyLength, ref length, 1);
        RDF.engine.SetDatatypeProperty(instanceBox, propertyWidth, ref width, 1);
        RDF.engine.SetDatatypeProperty(instanceBox, propertyHeight, ref height, 1);

        double  perimeter = RDF.engine.GetPerimeter(instanceBox);

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