ImportModel
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().
Syntax
public const string enginedll = @"engine.dll"; [DllImport(enginedll, EntryPoint = "ImportModel")] public static extern Int64 ImportModel(Int64 model, string fileName); [DllImport(enginedll, EntryPoint = "ImportModel")] public static extern Int64 ImportModel(Int64 model, byte[] fileName);
Property model
Size: 64 bit / 8 byte (value)Property fileName
Size: 64 bit / 8 byte (reference)
Example (based on pure API calls)
Here you can find code snippits that show how the API call ImportModel can be used.
using RDF; // include at least engine.cs within your solution ... public class OUT { public void MergeModel(Int64 model, string fileNameIN, string fileNameOUT) { // // Add content from file into current model // RDF.engine.ImportModel(model, System.Text.Encoding.ASCII.GetBytes(fileNameIN)); // // Save original and added content into a new file // RDF.engine.SaveModel(model, System.Text.Encoding.ASCII.GetBytes(fileNameOUT)); } public void main() { Int64 model = RDF.engine.OpenModel(System.Text.Encoding.ASCII.GetBytes("c:\\created\\myFileFirstPart.bin")); if (model != 0) { MergeModel(model, "c:\\created\\myFileSecondPart.bin", "c:\\created\\myMergedFile.bin"); RDF.engine.CloseModel(model); } else { System.Diagnostics.Debug.Assert(false); } } } ...