SaveInstanceTreeS
Syntax
public const string enginedll = @"engine.dll"; [DllImport(enginedll, EntryPoint = "SaveInstanceTreeS")] public static extern Int64 SaveInstanceTreeS(Int64 owlInstance, [MarshalAs(UnmanagedType.FunctionPtr)] WriteCallBackFunction callback, Int64 size);
Property owlInstance
Size: 64 bit / 8 byte (value)Property callback
Size: 64 bit / 8 byte (reference)Property size
Size: 64 bit / 8 byte (value)
Example (based on pure API calls)
Here you can find code snippits that show how the API call SaveInstanceTreeS can be used.
using RDF; // include at least engine.cs within your solution ... public class OUT { public const int BLOCK_LENGTH_WRITE = 20000; // no maximum limit public FileStream fs; public OUT(Int64 myInstance) { // define a progress callback delegate RDF.engine.WriteCallBackFunction callback = (value, size) => { byte[] buffer = new byte[size]; Marshal.Copy(value, buffer, 0, (int) size); fs.Write(buffer, 0, (int) size); }; fs = File.Open("exportedFile.bin", FileMode.Create); RDF.engine.SaveInstanceTreeS(myModel, callback, BLOCK_LENGTH_WRITE); fs.Close(); } } ...