[Da...] Posted April 27, 2022 Share Posted April 27, 2022 Hello guys, I'd like to create a script that does stuff in part projects, but I'm having some troubles in cycling on parts. The problem is that I cannot know the name of each part so I cannot use functions like gom.app.project.parts['Componente'].name because in this project it is called "Componente", but maybe tomorrow it is called "Part" or "Object" or "Whatever"... How can I create a script like for i in parts: tell me the name of i ? Is it possible? (In case I will transform with other commands, but let's start returning just the name of the part for an easy example) Thanks, Davide Link to comment Share on other sites More sharing options...
[Ma...] Posted April 27, 2022 Share Posted April 27, 2022 It's possible. Try: # -*- coding: utf-8 -*- import gom for i in gom.app.project.parts: print(i.name) Regards, Marcus 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