[CONNECT Update 16 C++] Compare ECInstance.GetValue and ECInstance.GetValueUsingAccessor

An ECInstance contains one or more properties.  The value of a property can be obtained using ECInstance.GetValue() or ECInstance.GetValueUsingAccessor().  Both methods work OK.

What is the purpose of an ECValueAccessor?  There is an enigmatic description in MicroStationAPI help...

A structure used for describing the complete location of an ECValue within an ECInstance.

They can be thought of as the equivalent to access strings, but generally do not require any string manipulation to create or use them. ECValueAccessors consist of a stack of locations, each of which consist of a triplet of an ECEnabler, property index, and array index. In cases where the array index is not applicable (primitive members or the roots of arrays), the INDEX_ROOT constant is used

As always, an example would be welcome. ECInstance.GetValue() seems to work OK for me.  Where does 'string manipulation' come into this?  Am I losing something by not using an ECValueAccessor?

Parents Reply Children
No Data