The entitySelection.add( ) method adds the specified entity to the entity selection.
Note: This method modifies the original entity selection.
- If the entity selection is ordered, entity is added at the end of the selection. If a reference to the same entity already belongs to the entity selection, it is duplicated and a new reference is added.
- If the entity selection is unordered, entity is added anywhere in the selection, with no specific order.
Note: For more information, please refer to the Ordered vs Unordered entity selections paragraph in the 4D Developer Guide.
An error occurs if entity and the entity selection are not related to the same dataClass. If the entity to be added is Null, no error is raised.