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
Here you can find code snippits that show how the API call GetPropertiesByIterator can be used.
using Engine; public Int64 GetPropertyCnt(Int64 model) { Int64 propertyCnt = 0, myIteratedProperty = Engine.x86_64.GetPropertiesByIterator(model, 0); while (myIteratedProperty != 0) { IntPtr propertyNamePtr = IntPtr.Zero; Engine.x86_64.GetNameOfProperty(myIteratedProperty, out propertyNamePtr); string propertyName = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(propertyNamePtr); Console.WriteLine(propertyName); myIteratedProperty = Engine.x86_64.GetPropertiesByIterator(model, myIteratedProperty); propertyCnt++; } Console.WriteLine(); return propertyCnt; } public void Example() { Int64 model = Engine.x86_64.CreateModel(); if (model != 0) { Int64 propertyCnt = GetPropertyCnt(model); // // Add a new property // Engine.x86_64.CreateProperty(model, 0, "CreatedPropertyToTestPropertyCnt"); System.Diagnostics.Debug.Assert(GetPropertyCnt(model) == propertyCnt + 1); Int64 propertyCntThroughAPI = 0; Engine.x86_64.OrderedHandles(model, (IntPtr) null, out propertyCntThroughAPI, (IntPtr) null, 0, 0); System.Diagnostics.Debug.Assert(GetPropertyCnt(model) == propertyCntThroughAPI); Engine.x86_64.CloseModel(model); } }