Jump to content

gom.interactive.sys.export_script


---
 Share

Recommended Posts

---
Hello, does anyone know what parameters should be in the gom.interactive.sys.export_script function?
Thank you for your help
Link to comment
Share on other sites

---

Hi,

you can run

print(gom.interactive.sys.export_script.__doc__)

from an App, which results in the following (in ZEISS INSPECT 2025):
 

sys.export_script (Export Script...) - Export Script

Parameters:

Name | Description                             | Type             | Optional
----------------------------------------------------------------------------
file | file name of the created script archive | Tom::Parse::File | No      
name | qualified name of the script to export  | QString          | No  

However, I'm not sure how this works.

What do you want to achieve?

 

Link to comment
Share on other sites

---

 

Example:

import gom

method_script_export_path = "C:/temp/methodscript.py"

# The qualified name contains the App's UUID
name = ":user.338124d1-8053-4b34-b95e-0ec3a84bc5dd.scripts.scripttest"

gom.script.sys.export_script(file=method_script_export_path, name=name)

 

Note: In this example, gom.script.sys.export_script() is used (not gom.interactive.sys.export_script))

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

script_export_path = "C:/V4-mer3d/Technologie/Data/scripts/Rozpracovane/sss.py"
name = "81d6d575-9c08-4428-9526-8820faa1523d"
I can't figure out the correct format for name.

gom.script.sys.export_script(file=script_export_path, name=name)

 

image.png.12ddf5ca5d0852197540fda083517142.png

name = "c76824b1-53c5-4f20-8208-61b314e3590d"

name = ":user.c76824b1-53c5-4f20-8208-61b314e3590d.scripts.sss"

name = ":lsefranek.c76824b1-53c5-4f20-8208-61b314e3590d.scripts.sss"

Cannod find the script with the name ......

 

Link to comment
Share on other sites

Hi,

the correct format is

name = ":user.<app_uuid>.scripts.sss"

with <app_uuid> from the element "uuid" in the file metainfo.json (not the script's UUID from the script properties.

Best regards,

Matthias

Link to comment
Share on other sites

 Share

×
×
  • Create New...