Reviewing Your HyperWorks Scripts Compatibility with Script Parser

Custom HyperWorks features (scripts, process automation, general customizations etc.) are typically developed for a specific version using the set of tools and APIs available in that version. If we want to verify the compatibility of a script with an earlier or a newer version, we can simply run it there. However, manually checking and testing an entire custom package containing tens of scripts and thousands of lines of code is not feasible.

Starting in Simulation 2022.2, the HyperWorks installation includes a handy tool called Script Parser. It is written in Tcl and you can launch it by sourcing the main.tcl file which can be found in <install_dir>/hwdesktop/utility/scriptparser. Script Parser allows you to automatically scan your HyperWorks Tcl scripts and identify the API commands present in the code. You can scan individual files or point to entire directories containing the *.tcl files. The built-in database operates with three main categories - API, Packages and Technologies, each further split into several subcategories. This database can be easily extended, and new subcategories can be created to look for a specific set of commands. You can also choose for which HyperWorks version you want to check your code.

The following video shows you Script Parser in action. For more details on how to use Script Parse, you can follow the document in <install_dir>/hwdesktop/utility/scriptparser/help.