OpenModelA

This function opens the model via an array.
References inside to other ontologies will be included.
A handle to the model will be returned, or 0 in case something went wrong.

Syntax

public const string EngineDLL = @"engine.dll";[DllImport(EngineDLL, EntryPoint = "OpenModelA")]
public static extern Int64 OpenModelA(byte[] content, Int64 size);    

Property content

Size: 32 bit / 4 byte (reference)
The content of this IO call, the size of the content is defined by attribute size.

Property size

Size: 64 bit / 8 byte (value)
The size of the content as defined in number of bytes.

Example

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

using Engine;

    ...

    public class IN
    {
        public Int64 myModel = 0;

        public IN()
        {
            FileStream fs = File.Open("exampleFile.bin", FileMode.Open);

            if (fs != null)
            {
                Int64 size = (Int64) fs.Length;

                byte[] content = new byte[size];
                fs.Read(content, 0, (int) size);
                fs.Close();

                myModel = Engine.x86_64.OpenModelA(content, size);
            }
        } 
    }

    ...