Toolkits

In the Ansys Electronics Desktop, you can add toolkits, which are custom functions that perform a specific task. Toolkits can help automate and streamline the process of building your Ansys Mechanical design. Toolkits can aid in:

Use IronPython for scripting the user interface and commands. Custom toolkits can be accessed from the Mechanical > Toolkit menu.

Currently, no toolkits are included for Mechanical designs, so none will appear when you first access the Toolkit menu. However, you can create toolkit folders, create your own custom scripts, and include them in the Toolkit menu. The folder names must be defined exactly as described and pictured in the following instructions:

  1. Create a Toolkits folder in the "<installation_dir>\v252\AnsysEM\userlib" directory.

    The default <installation_dir> path is "C:\Program Files\ANSYS Inc" on Windows and /opt/ansys_inc/ on Linux.

    Note:

    You must have administrative privileges to create folders and files within the Program Files branch of the system drive.

  2. Create a Mechanical subfolder in the Toolkits folder.
  3. Save one or more script files to the Mechanical subfolder at the bottom of the path just created.

    Note:

    Do not attempt to record scripts directly to a folder in the Program Files branch of your system drive. Record the script to a working folder, edit it as needed, and then copy the *.py file into the ...\userlib\Toolkits\Mechanical folder.

  4. Click Mechanical > Toolkit > Update Menu to refresh the menu contents.
  5. Go to the Mechanical > Toolkit > UserLib menu to verify that your scripts are available for selection:

    Note:

    When you open or insert a Mechanical design, the Mechanical > Toolkit > UserLib menu is updated automatically. However, if you add, remove, or rename any scripts, you can use the Mechanical > Toolkit > Update command to immediately refresh the menu contents.