PropertyHandle :: OpenHierarchy - Open hierarchy property handle
The function opens a hierarchy property handle, which creates a property handle for bottom property handle. The function will duplicate the complete hierarchy including the top property handle. The function copies the selections from the source hierarchy, i.e. the result contains the same selected instance as the source hierarchy.
The function returns a property handle for the collection in the bottom property handle. Upper parent property handle, which have been created by the function, will be destructed automatically when destroying the bottom property handle. When no top property handle is passed or when the top property handle is not part of the source hierarchy, the returned hierarchy ends with the extent property handle for the bottom property handle.
One may access upper property handles by referring parent property handle with the GetParentProperty () function. Since all parents are copies, one may change the selection in any parent handle without danger.
When passing true ( YES ) for path option, the function will turn the property hierarchy into a path property, which automatically iterates on higher levels.
When the source handle is opened in write mode or when any of the property handles in the hierarchy are opened in write mode, the copy might refer to a write protected instance. One may use the Refresh () function to remove the write protection, after instances have been released in the other hierarchy.
The root for the hierarchy it the top handle of the hierarchy. Since this is a copy handle, the complete hierarchy will be closed, when closing the origin handle (or the extend node) implicitly or explicitly.
Depending on the copy_selection option the selection from the source path is copies as well, i.e. the property handles in the hierarchy are positioned to the same instance as in the appropriate source handle.
Implementation details
- bottom_ph
- Lowest property handle
This is a pointer to the lowest property handle in a hierarchy or property path.
- top_ph
- Highest property handle
This is a pointer to the top property handle in a hierarchy or property path. When the pointer is NULL, the top property handle is the extent, which is the root of the path.
Default: NULL
- path_opt
- Path option
The option indicates, that a path property will be created. Path properties are properties that automatically switch the parent property when reaching the end of collection for a child.
Default: NO
- accmode
- Access mode
Default: PI_undefined
- copy_selection
- Copy selection for property handle
The option is true ( YES ), when the selection from a source handle is to be copied to the target handle, i.e. when the target handle is positioned to the same instance as the source handle. The target handle is not positioned, when this option is set to false ( NO ).
The copy selection value AUTO copies the selection for the hierarchy except the property handle, which is returned to the application.
Default: YES