Home / FEA / Scripting in Ansys Discovery: Automating repetitive tasks and complex workflows

Scripting in Ansys Discovery: Automating repetitive tasks and complex workflows

Scripting in Ansys Discovery facilitates the optimisation of repetitive tasks and complex workflows across a broad range of applications. Notably, the tools available in Discovery’s script editor allow for the intuitive learning and implementation of scripts into projects, both for advanced and new users with limited scripting experience. LEAP has composed the following video series to highlight the key functionality of Discovery’s script editor. Crucially it also provides users with an overview of the tools available such that they can learn and adapt scripting methods to their own needs. Each video on this series builds on concepts introduced in earlier parts and shows various live coding examples to create a variety of useful scripts.

 

Part 1 of 5: Introduction

This section provides an overview of the script editor in Ansys Discovery, as well as the general tools available and supporting API documentation. It presents an outline of the following series content as well as the general working environment each video will use. Finally, this introduction presents two common examples of Discovery scripting in action, used for the creation and evaluation of geometry.

Part 2 of 5: Using the Record Button

This video introduces the record button, an incredibly intuitive tool users can employ to convert traditional manual workflows to scripted equivalents. It also presents a live coding example alongside explanations of various best practice scripting methods.

Part 3 of 5: Parameterising Scripts

Part 3 expands on the prior video, introducing the user to various means of parameterisation and the efficiency and flexibility created by such scripts. This is a crucial skill for geometry creation, manipulation and evaluation. It also highlights the extended functionality in linking a Discovery Script to a Workbench project, allowing for remote geometry manipulation through the user created parameters.

Part 4 of 5: Using Named Selection

An introduction to Named Selections and their creation/uses through Discovery Scripting. This video continues to build on the previous live scripting example showing the typical workflow and suggested approach to understanding new coding functionality and creating a script from scratch. The content highlights the ability to evaluate and manipulate existing geometry through the use of Named Selections.

Part 5 of 5: Custom User Inputs

The final video in this series presents an advanced scripting case in which custom user input prompts are presented to the user mid-script run, and upon user interaction a series of geometric commands are executed. The live coding example shows a typical troubleshooting approach taken to ensure scripts run correctly, as well as the integration of helper functions into a larger script file. The more advanced scripting functionality shown here also presents the broad possible applications of scripting within the user’s own workflows.

Final remarks

We hope this has provided a useful introduction and overview of the scripting capabilities within Ansys Discovery. We welcome Ansys customers in Australia and New Zealand to contact the LEAP technical support team if you require any further information or assistance with scripting in Ansys Discovery.

Leave a Reply

Your email address will not be published. Required fields are marked *