[Kr...] Posted February 6, 2023 Share Posted February 6, 2023 Hello, I'm having a few issues with a script that contains mesh export functionality. All of the projects we have use different names for the part container in the project. This means that this export script won't export the mesh if the part container doesn't match the project parts name. In the example below 'Changeme'. Is there a way to remove this or set it to select the mesh regardless of the container name? I only work with single part projects so I won't need this to work in a multi part project. Many Thanks gom.script.sys.export_stl ( bgr_coding=False, binary=True, color=False, elements=gom.ElementSelection ({'category': ['key', 'elements', 'part', gom.app.project.parts['Changeme'], 'explorer_category', 'actual_part']}), export_in_one_file=True, export_stages_mode='current', file='Folderlocation', length_unit='default', set_stl_color_bit=False) Link to comment Share on other sites More sharing options...
[Na...] Posted February 6, 2023 Share Posted February 6, 2023 Hi Kristian, you can address the part with gom.app.project.parts[0] for example. (https://connect.gom.com/display/GKB/Scripting+in+the+Part-based+Workflow) Nanno Link to comment Share on other sites More sharing options...
[Kr...] Posted February 6, 2023 Author Share Posted February 6, 2023 Hi Nanno, Thank you very much. Worked perfectly. Kind Regards Please sign in to view this quote. 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