getEntityFromGroup
Overview
This utility is used for extracting the entities (Face/Edge/Node/Elements) from groups. This can be further used as input for performing other operations.
Syntax
EntityIdArray = simlab.getEntityFromGroup('GroupName')
Use Case
Below are some of the use case where GetEntityFromGroup will be useful to make the script generic.
- To delete the entities present in a group
- To perform an operation where only one entity can be given as input at a time
Why we need this utility?
If we want to delete the faces present in a group, we can select the faces from the group and delete it, but when we recorded this operation using Project > Record, only the ID's of the deleted faces will be recorded in the script. When used in different models, it will fail or delete other faces due to the conflict in ID's between different models. In order to overcome this, we can make use of this utility to extract the faces from groups and utilize it for any kind of models. Assume that we have a group of entities and if we wanted to do an operation using the entities in the group where only one entity can be given as input, we cannot do it in a single shot. So, we can get the entities from the group using the utility and can be given as input for the operation one by one using "for loop" and the process can be done for all the faces in the group.