Jump to content

Exporting project keywords in a .txt file


---
 Share

Recommended Posts

Hello everyone,

I want to learn if it is possible or not to export project keywords and write on  a .txt file or at least, to access the keywords as parameters. We use project keywords (which includes some info about part number, serial number, inspector info etc.) in every part is scanned and inspected. Therefore, in our script, we need to use project keywords filled by inspector in a separate file (as marking tag of the part). Is there a way to do that?

Many thanks,

Canset

Link to comment
Share on other sites

Canset,

I've recently begun utilizing project keywords in our scan templates as well (they've proven particularly handy for autofilling information on report pages!). You can access project keywords in the Script Editor by right-clicking and selecting Insert--> Element Value (or hitting F2 as a keyboard shortcut). In the window that appears, select the Project Object group, and "project" in the list, then in the keyword window at the bottom click on "User-defined keywords" to access all the available project keywords. In the screenshot below I've inserted the "Part" keyword, and it appears in the script as the "gom.app.project.get ('user_part')" string variable. From here you could use standard python open/write methods to write the keyword variables to a text file in whatever format you choose. I hope this helps!

Regards,

Michael

Capture.PNG.374fbed6967b1fab59b3733ec7bd3834.PNG

EDIT: I should point out that this method works for at lease ATOS V8 through 2020, we haven't updated to ATOS 2021 so I don't know if the Script Editor interface has changed significantly in that version.

Edited
Link to comment
Share on other sites

Hello Michael,

We also need project keywords both for reporting purposes and use .txt files for kind of separate tag file  of the part. Actually after creating this subject, I accessed and edit the keyword variables through script.(gom.sys.set_project_keywords). However, your way of accessing element values looks like much more useful.

Many thanks for your help,

Canset

Link to comment
Share on other sites

 Share

×
×
  • Create New...