Skip to content

How to use pyaedt to iterate through all the objects and select the objects by name? #4359

Closed Answered by fwlfHS
aknsj asked this question in Q&A
Discussion options

You must be logged in to vote

Does that work?:
all_objs = ipk.modeler.object_list
objects_list = [obj for obj in all_objs if obj.name.lower().startswith("block")]
name_list = [obj.name for obj in all_objs if obj.name.lower().startswith("block")]

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@aknsj
Comment options

@YLSHA
Comment options

@aknsj
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by aknsj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants