Jump to content

Adding workspaces “workflow_commands” drop-downs?


---
 Share

Recommended Posts

---

Is there a way when creating a workspace in an add-on to have a drop-down menu item?

Adding workspaces to add-ons — Add-On Documentation (zeissiqs.github.io)

 

Something like the Measurement dropdown: 

image.png.3be3bd69a98dc8a592fb640f9d7642fc.png

 

How do we write the description of a folder?

"workflow_commands": [
    "sys.import_file",
    "[separator]",
    "userscript.Blade_CMM__ProjectSetup__Project_Setup",
    "inspect.tb_create_blade_stylus_correction_cmd_group"]
Link to comment
Share on other sites

---

Hi,

Maybe this is not a general solution, but it works for Add-on scripts.

  1. Add a group of scripts (which are located in a common folder) to the Title Toolbar to view the naming of a group:
    View->Screen Setup->Toolbar...
    In the Edit Toolbar dialog
    • Select "Title Toolbar" from the dropdown widget
    • In the table below (with the entry [...]): RMB->Add Script Group
    • Add a folder containing your scripts - I am using "misc" from the "Python API Examples" Add-on for demonstration here
    • The toolbar entry is named "userscript.group_PythonAPiExamples__examples__misc" (double underscore is used as folder separator)
  2. Add this group entry to your workspace JSON file, e.g.
    	...
    	"workflow_commands": [
            "userscript.group_PythonApiExamples__examples__misc",
            "sys.import_file"
        ],
    	...
     

After restarting ZEISS INSPECT, the group appears in the workspace toolbar:

image.png.c8ef9dfe3e68887c80c0ca42af78766f.png

You can replace the generic script icons by specific ones in the scripts' properties dialog (Add-on Explorer).

Hope this helps!

Best regards

Matthias 

Link to comment
Share on other sites

 Share

×
×
  • Create New...