company logo

PropertyHandle :: GetValue - Get instance value

The function returns the value for the property instance. It should be used for accessing attribute handles. In contrast to Get the function returns an instance area also when the attribute handle is not positioned (e.g. for the initial instance before creating an instance).

For collection properties the function works the same way as the Get() function except when passing AUTO as index value. In this case GetValue returns the instance area also when no instance is selected.

When accessing array attributes the function returns the array element according to the passed index.

Return value:  Instance area ( ::Instance  )

Instances do have the type of the referenced property handle (collection type). The instance contains a pointer to a properly structured instance area.

You can use the !-operator or the GetData() function to check whether the instance refers to data or not.

Implementation details

::Instance PropertyHandle  :: GetValue ( int32 lindx0 )
  • lindx0 - Position in collection

    The position of an instance in a collection depends on the selected index. if the collection is unsorted the position is the only way for accessing the instance.

    For sorted collections the position is determined according to the instance key. If is a contradiction between position and key value the position will be ignored.

    Special positions are

    CUR_INSTANCE (-1) refers to the currently selected instance. If no instance is selected it refers to the first instance.

    FIRST_INSTANCE (0) refers to the first instance in a collection according to the selected index (sort order).

    FIRST_INSTANCE (0x7fffffff) refers to the last instance in a collection according to the selected index (sort order).