SaveModelA

This function saves the current model in an array.

Syntax

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

[DllImport(enginedll, EntryPoint = "SaveModelA")]
public static extern Int64 SaveModelA(Int64 model, byte[] content, out 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: 32 bit / 4 byte (reference)
The content of this IO call, the size of the content is defined by attribute size.

Property size

Size: 32 bit / 4 byte (reference)
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 SaveModelA can be used.

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

    ...

    public class OUT
    {
        public OUT(Int64 myModel)
        {
            FileStream fs = File.Open("exportedFile.bin", FileMode.Create);

            Int64 size = 0;
            RDF.engine.SaveModelA(myModel, 0, out size);

            byte[] buffer = new byte[size];
            RDF.engine.SaveModelA(myModel, buffer, out size);

            fs.Write(buffer, 0, (int) size);

            fs.Close();
        } 
    }

    ...