Skip to Main Content

Scripting in Ansys Simpleware: Customizing and Automating Workflows

June 29, 2025

READ ALOUD

PAUSE READ

simpleware-scripting-banner.png

We recently explained automating workflows in Ansys Simpleware software. We talked about scripting in Simpleware software to achieve better automation of repetitive tasks and showed how Simpleware software can be augmented for specific workflows with small scripts. Expanding on the topics covered in the webinar, we would like to share some of the code demonstrated.

Creating a Custom Filter

We looked at creating a custom filter, and wrapping it in a Simpleware command:

command.jpeg

The great advantage of commands is that they fit nicely into the Simpleware undo stack, meaning for complex operations performed via scripting, a single undo (Ctrl+Z) will undo every operation performed. Creating atomic operations like this greatly simplifies user-operation further down the line. After creating the simple command, we added this to the interface via a UserAction:

user-action.jpeg

Using this pattern, it is incredibly simple to enhance the Simpleware interface to include any custom functionality you might require. The usefulness of this technique is much more evident when conducting repetitive operations, such as when you have many, very similar samples of similar items.

When using Simpleware software for one-off research projects, scripting can be used to ensure that the parameters you are using are the best parameters to achieve the result that you are trying to achieve. The workflow for this would be:

  1. Establish what a "good result" is, and be able to measure it.
  2. Establish what parameters to modify.
  3. Write code to take parameters as inputs and measure the quality of the output.
  4. Loop over parameters.

Optimizing Values and Fine-tuning Parameters

We focused on optimizing the values given to the rib-smoothing filter. Another exciting application of this technique is fine-tuning meshing parameters, in a mesh-convergence study or similar. The code relevant to this is quite trivial:

mesh-code.jpeg

In fact, the difficulty we encounter here is measuring the volume; as the quick statistics are considered proxies to the Simpleware software statistics, we write a small method to get the volume of an active mask:

active-mask.jpeg

Setting up a GUI

Finally, we touched on the creation of a GUI within Simpleware software:

magic-image.jpg

Hopefully, this provided a basic framework for writing GUI-enhanced filters within the Simpleware software framework.

Learn more about Ansys Simpleware software. 


Just for you. We have some additional resources you may enjoy.

TAKE A LOOK


Recommendations

What’s New in Ansys Simpleware Medical 2026 R1

What’s New in Ansys Simpleware Medical 2026 R1

Ansys Simpleware Medical 2026 R1 is here, delivering powerful new AI-driven segmentation alongside enhanced modeling capabilities.

Robotics Startup Gives Construction Workers a Safety Lift with Automation

Robotics Startup Gives Construction Workers a Safety Lift with Automation

Learn how KEWAZO uses simulation to develop material lifting robots and automate physically demanding and unsafe construction industry tasks.

Ansys Simpleware Medical Receives MDR Certification

Ansys Simpleware Medical Receives MDR Certification

Learn more about Ansys Simpleware Medical software receiving certification under the European Unions (EU)Medica Device Regulation (MDR) 2017/745.

The Advantage Blog

The Ansys Advantage blog, featuring contributions from Ansys and other technology experts, keeps you updated on how Ansys simulation is powering innovation that drives human advancement.