-
-
March 19, 2024 at 5:52 pmMatthew LittleSubscriber
I've created several User buttons for Mechanical (Automation/User Buttons) that I want to share with my coworkers. Is there a way to save these Python scripts somewhere, and whenever someone opens an instance of Mechanical, Ansys reads in the Python scripts and automatically creates the Buttons?
I'm trying to make it as hands-free as possible so noone has to deal with copying/pasting scripts into the User Button definition every time there is a change in the code. I currently have it where all a coworker has to do is copy and paste a small script into a user button once, and that small script reloads everything and presents the GUI, but this is starting to get cumbersome to load in with increasing functionallity. Individual buttons will run smoother.
-
March 20, 2024 at 6:35 amAniketForum Moderator
Hi Matthew, you can create an ACT extension out of the code and distribute the binary to the users. You can also install the extension as default so all the buttons will be loaded each time a project is opened.
I hope you have already gone through the developer's page for ACT, which is used for automation in Mechanical, but if not, kindly check:
https://catalog.ansys.com/Developers.cshtml
This link includes the developer's guides, API guides, migration notes, and some templates.
Finally, you can go through the scripting guide for Mechanical:
https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/act_script/act_script.html
https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/act_cust_mech/act_cust_mech.html
and for Workbench:
https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/wb2_js/wb2_js.html
https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/act_cust_wb/act_cust_wb.html
-Aniket
-
- The topic ‘Automatically load user buttons when Mechanical Opens’ is closed to new replies.
- Workbench license error
- Unexpected error on Workbench: Root element not found.
- Unexpected issues with SCCM deployment of Ansys Fluids and Structures 2024 R1
- Questions and recommendations: Septum Horn Antenna
- AQWA: Hydrodynamic response error
- Tutorial or Help for 2 way FSI
- Unable to connect to the license
- Moment Reaction probe with Large deformation
- 2 way coupled FSI for ball bearing
- Ansys with Vmware and CPU configuration : I’m lost, good practice?
-
1421
-
599
-
591
-
565
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.