Script Tip Friday- Where to Start

Script Tip Friday- Where to Start

Welcome back to Script Tip Friday. If you're looking for past articles, please visit Ansys Structures LinkedIn page and filter for "Articles".

This week, Pierre Thieffry, Senior Principal R&D Engineer at Ansys, is back because he got a recent request on documentation for scripting. Many people don't know where to go to get started, so this short article is here to help:

No alt text provided for this image

"When users tell me they are interested in scripting, their first legitimate question is 'where do I find information'? Getting started is a critical part of the process. Hopefully, we have some places for you to start with. Of course, support is always available to help. But I also know by experience that an efficient way to start is to look at some examples and use a lot of copy/paste.?

So, the first place I would like to mention is... the documentation! There are examples available both in the offline and the online versions. I would suggest to start with Mechanical's scripting guide. You will find several examples of actions you will likely use over and over again such a selecting items, navigating Mechanical's tree, interacting with results. You will also find some more advanced examples such as drawing in the graphics window. A shortcut is available from within Mechanical: if you click on the blue question mark at the top right of the menu bar, you will see a link to "Scripting - Quick Start Guide"

No alt text provided for this image

Examples of use of Python Code and Python Results are also available. These two features were added recently to allow you to introduce Python scripts in the simulation tree so they will execute with every simulation. This is of tremendous help when you want to automate changes in your model or simply export some data after each run.?

If you are more interested in our pyAnsys solutions, the pyAnsys docs page at?https://docs.pyansys.com/?will be your preferred location. Again, many examples are available to get your started - from setting up simulations to post-processing results.?

And last but not least, the Ansys Learning Hub will be the place to find entire trainings on scripting and customization. You could for example visit the structures building and look for the 'Customization' section. And who knows? Maybe you'll find some other interesting trainings on the many topics we cover!

Visit our learning hub here and let us know what Script Tip YOU'D like next! Ansys Learning Hub - Learn from Experts at Your own Pace

要查看或添加评论,请登录

Ansys Structures的更多文章

社区洞察

其他会员也浏览了