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 = "OpenModelW")] public static extern Int64 OpenModelW(string fileName); [DllImport(enginedll, EntryPoint = "OpenModelW")] public static extern Int64 OpenModelW(byte[] fileName);
Property fileName
Size: 32 bit / 4 byte (reference)
Example (based on pure API calls)
Here you can find code snippets that show how the API call OpenModelW can be used.
using RDF; // include at least Engine.cs within your solution ... Int64 GetFileInstanceCount(string fileName) { Int64 instanceCount = 0, model = RDF.Engine.OpenModelW(System.Text.Encoding.Unicode.GetBytes(fileName)); if (model) { Int64 myInstance = RDF.Engine.GetInstancesByIterator(model, 0); while (myInstance != 0) { instanceCount++; myInstance = RDF.Engine.GetInstancesByIterator(model, myInstance); } RDF.Engine.CloseModel(model); } return instanceCount; } int main() { Int64 noInstances = GetFileInstanceCount("c:\\created\\myFile.bin"); }