[Em...] Posted July 13, 2021 Share Posted July 13, 2021 Hello, I would like to access a list of names of the elements in an Element Group, but it doesn't seem like there is a Element Value in neither the Geometry-tab or Information-tab, that corresponds to that. Maybe I am overlooking something? Thank you, Best regards, Emil. Link to comment Share on other sites More sharing options...
[Sh...] Posted July 13, 2021 Share Posted July 13, 2021 This should get you a list of just the names of the elements in the group. names = [elem.name for elem in gom.app.project.inspection['Your_Group_Name'].creation_sequence_args['elements']] Link to comment Share on other sites More sharing options...
[Be...] Posted July 19, 2021 Share Posted July 19, 2021 A token (but not officially offered right now) is 'group_element_list_draft' to get a list of group members. print (gom.app.project.inspection['your_group_name'].group_element_list_draft) Shain's tip is based on the creation of the element group which normally should also work, but if the creation command differs you can try the mention token (as you can see it's still a 'draft' version) Link to comment Share on other sites More sharing options...
[Em...] Posted August 18, 2021 Author Share Posted August 18, 2021 Ended with solution: try: elements = elementGroup.group_element_list_draft for i, element in enumerate(elements): ## Access element except: pass Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in