I've been looking at how to get the field values from commands using GetFieldValue. There seem to be some inconsistencies depending on the command type and the type of value (array v. scalar).
1. For some fields like ID, if the command is not a DimensionCommand, HasField will return True for index values {-1, 0, 1, 2}. For DimensionCommand objects, {0, 1} return True. The value returned by calls to GetFieldValue will all be the same. Why does this happen? I would expect ENUM_FIELD_TYPES.ID to be a scalar value and thus only have a value at 0 (or 1 if we're 1-indexing).
2. Are arrays 0 or 1 indexed? It seems like certain fields have values from [1, N] while others have values from [1, N] as well as at 0. An example, for ENUM_FIELD_TYPES.THEO_X, if GetDataTypeCount returns 6, there will be values at {1, 2, 3, 4, 5, 6}, but also a value at 0, which for a Plane will be the location of the Plane. Other fields don't have values at 0 but do have an array of values.
3. GetDataTypeCountUniqueIndex Always returns 0
I'm not sure what the pattern is here. I feel like I'm missing something about how data in fields are represented. Any ideas why I would be seeing the above behavior?
Does does PC-DMIS distinguish scalar and array values? Why do some fields seem to be 1-indexed while also having values at the index 0?