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
// Visual Studio for Windows public: __int64 __declspec(dllexport) __stdcall GetPropertiesByIterator( __int64 model, __int64 rdfProperty ); // Linux, OS-X and non-Visual Studio Windows solutions public: int64_t GetPropertiesByIterator( int64_t model, int64_t 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.
int64_t GetPropertyCnt(int64_t model) { int64_t propertyCnt = 0, myIteratedProperty = GetPropertiesByIterator(model, 0); while (myIteratedProperty) { char * propertyName = nullptr; GetNameOfProperty(myIteratedProperty, &propertyName); // // The name of the property can be checked by placing a breakpoint after this point while debugging // myIteratedProperty = GetPropertiesByIterator(model, myIteratedProperty); propertyCnt++; } return propertyCnt; } int _tmain(int argc, _TCHAR* argv[]) { int64_t model = CreateModel(); if (model) { int64_t propertyCnt = GetPropertyCnt(model); // // Add a new property // CreateProperty(model, 0, "CreatedPropertyToTestPropertyCnt"); assert(GetPropertyCnt(model) == propertyCnt + 1); int64_t propertyCntThroughAPI = 0; OrderedHandles(model, nullptr, &propertyCntThroughAPI, nullptr, 0, 0); assert(GetPropertyCnt(model) == propertyCntThroughAPI); CloseModel(model); } return 0; }