Installing and Running Scripts#

Lattix Scripts can be run either from the ldm or from the ldcscript. ldcscript is a command line application that can be used in batch mode

Installing a Script#

There are 2 ways to install a script

  • Copy the script into the LattixInstall/scripts directory (Not recommended)

  • Copy the script into custom scripts directory (Recommended)

You can also configure additional script directories using View–>Preference–>Scripting. We recommend configuring your own script directory if you are editing and testing new scripts because Operating Systems such as Windows often make it difficult to edit files in the “Program Files” directory.

custom_scripts_directory

Running a Script from ldm#

A script has annotation that configures which menu item it will appear under. If there is no such annotation, the script menu item will appear under the Script menu. If there is a Report annotation, the script menu item will appear under the Report menu. The output of the script generally goes onto the Console. If the script changes the project that is loaded, you will see those changes in the graphical user interface.

Running a Script using ldcscript#

ldcscript <project-file> [-script]:<Script> [ScriptOpts]
ldcscript -help
ldcscript -help:ScriptOpts

The actual usage of the command line will depend on what scripts are installed. For instance, if the script “ListPaths.groovy” is installed, the help will look like this:

ldcscript -help:ScriptOpts

ldcscript <ProjectFile>
-script:ListPaths
-srcPart:<Source partition>
-targetPart:<Target partition>
-pathType:[List_All_Paths|List_Edge_Disjoint_Paths]
-outputFile:<Output File>