GetPropertiesByIterator
If input property is zero, the handle will point to the first relevant property.
If all properties are past (or no relevant properties are found), the function will return 0.
Syntax
public const string enginedll = @"engine.dll"; [DllImport(enginedll, EntryPoint = "GetPropertiesByIterator")] public static extern Int64 GetPropertiesByIterator(Int64 model, Int64 rdfProperty);
Property model
Size: 64 bit / 8 byte (value)Property rdfProperty
Size: 64 bit / 8 byte (value)
Example (based on pure API calls)
Here you can find code snippits that show how the API call GetPropertiesByIterator can be used.
using RDF; // include at least engine.cs within your solution public Int64 GetPropertyCnt(Int64 model) { Int64 propertyCnt = 0, myIteratedProperty = RDF.engine.GetPropertiesByIterator(model, 0); while (myIteratedProperty != 0) { IntPtr propertyNamePtr = IntPtr.Zero; RDF.engine.GetNameOfProperty(myIteratedProperty, out propertyNamePtr); string propertyName = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(propertyNamePtr); Console.WriteLine(propertyName); myIteratedProperty = RDF.engine.GetPropertiesByIterator(model, myIteratedProperty); propertyCnt++; } Console.WriteLine(); return propertyCnt; } public void Example() { Int64 model = RDF.engine.CreateModel(); if (model != 0) { Int64 propertyCnt = GetPropertyCnt(model); // // Add a new property // RDF.engine.CreateProperty(model, 0, "CreatedPropertyToTestPropertyCnt"); System.Diagnostics.Debug.Assert(GetPropertyCnt(model) == propertyCnt + 1); Int64 propertyCntThroughAPI = 0; RDF.engine.OrderedHandles(model, (IntPtr) null, out propertyCntThroughAPI, (IntPtr) null, 0, 0); System.Diagnostics.Debug.Assert(GetPropertyCnt(model) == propertyCntThroughAPI); RDF.engine.CloseModel(model); } }