[Má...] Posted December 21, 2020 Share Posted December 21, 2020 Hello, I would like to use the currently opened project parameters like name of the project and path of the project. ( eg.: name: New_project 1; path: C:/Users/.../Desktop ) How can I implement these in my script? This is not in Kiosk just an user-defined script. Best regards, Máté Tömöri Link to comment https://qualityforum.zeiss.com/topic/36-export-using-currently-opened-project-parameters/ Share on other sites More sharing options...
[Be...] Posted December 22, 2020 Share Posted December 22, 2020 The following code may be helpful: # -*- coding: utf-8 -*- import gom import gom_utils import os project_file = gom.app.project.project_file print (project_file) print (os.path.dirname (project_file)) print (os.path.basename (project_file)) There could be filename and Operating System constellations where this approach wouldn't work, but usually this approach is sufficient enough. Hope this helps?! Regards Link to comment https://qualityforum.zeiss.com/topic/36-export-using-currently-opened-project-parameters/#findComment-97 Share on other sites More sharing options...
[Má...] Posted January 4, 2021 Author Share Posted January 4, 2021 without import gom_utils it is working. Thanks! Link to comment https://qualityforum.zeiss.com/topic/36-export-using-currently-opened-project-parameters/#findComment-104 Share on other sites More sharing options...
[Th...] Posted January 14, 2021 Share Posted January 14, 2021 Just an additional comment for more general access to project parameters: In the script editor hit the F2 key and select "Object group: Project -> project -> ..." in the pop up dialog. I am quite sure this is what Bernd did to get "gom.app.project.project_file". Link to comment https://qualityforum.zeiss.com/topic/36-export-using-currently-opened-project-parameters/#findComment-135 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