catia_run_script
Run custom VBScript functions in CATIA and retrieve results, enabling access to any API or object-model feature not covered by dedicated tools.
Instructions
Run a VBScript function inside CATIA and return its value. This is the escape hatch to the whole CATIA object model, including anything this server has no dedicated tool for and any API that only exists on some releases. The script must define the named function; CATIA is passed in automatically as the first parameter unless you pass your own. Returns whatever the function returns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | Full VBScript source, defining the function named below. Example: 'Function Run(catia)\n Run = catia.Documents.Count\nEnd Function' | |
| function | No | Name of the function inside the script to call. | Run |
| pass_application | No | Pass the CATIA Application object as the first argument to the function. Turn this off if your function takes no arguments. |