::hwat::utils::FindAttachedEntityToGivenEntity

Finds the list of attached entities for a given entity and puts them on mark 2.

Syntax

::hwat::utils::FindAttachedEntityToGivenEntity entityId thisEntityType attachedEntityType [numbers]

Arguments

entityId
A Tcl list of IDs of the entities (same type) or ID of the entity to which to find the attached entities.
thisEntityType
The entity type of above entities or entity.
numbers
1 to display numbers on the found entities, 0 to not display.
Default = 0

Returns

Success
A Tcl list of attached entities to the given entity
Failure
{}

Example

This call should return all the components attached to node 111.

::hwat::utils::FindAttachedEntityToGivenEntity  111 nodes components 
This call should return all components attached to the component 111. This list should exclude the original component 111 from the list.
::hwat::utils::FindAttachedEntityToGivenEntity  222 components components 1

Comments

Will return 0 if there are no attached entities. If the entity type and the attached entity types are the same, and if only one entity ID is given, this ID is removed from the list of attached entities.