This function imports a design tree via an array.
The design tree will be added to the given existing model.
The return value contains the first instance not referenced by any other instance or zero if it does not exist. In case the imported model is created with SaveInstanceTree() this instance is unique and equal to the instance used within the call SaveInstanceTree().


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

[DllImport(enginedll, EntryPoint = "ImportModelA")]
public static extern Int64 ImportModelA(Int64 model, byte[] content, Int64 size);    

Property model

Size: 64 bit / 8 byte (value)
The handle to the model. The model handle is static during its existance. Several models can be opened simultaniously within one session. Different models are always independent, threads are allowed to be running on different models simultaniously.

Property content

Size: 64 bit / 8 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 (based on pure API calls)

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

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


    public class IN
        public IN(Int64 model)
            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);

                myModel = RDF.engine.ImportModelA(model, content, size);