-
-
July 19, 2022 at 5:02 am
zhanh95
SubscriberDear all,
I used a lot of the Ext.API built in snippets which are built in Mechanical locally, which means Python scripts in workbench cannot access these built in functions. That is why ACT(based on Python) in workbench can only open the Harmonic Response but cannot do any further action. The APDL can operate Ansys without GUI, therefore it has the supreme level of access by using APDL command and it wont limited by built in Mechanical function. I am wondering is the APDL the right way to do automation in Workbench to change the analysis setting in Mechanical? Can I use APDL command in the ACT app builder?
Sincerely,
zhanh95
-
July 20, 2022 at 5:55 pm
Aniket Chavan
Forum ModeratorYou can create an extension that has all the snippets that you have created using ACT. Make sure the ACT extension is loaded and simply pass the following via workbench journal (python based):
extension = ExtAPI.ExtensionManager.GetExtensionByName("
").GetModule()
extension.functioninExtension()When you are using Mechanical, You can automate APDL command snippets, but then again you will need to use the same two commands above, so why not change the things in GUI instead of changing them in command snippet?
-Aniket
-
July 21, 2022 at 4:52 pm
zhanh95
SubscriberThank you for your replying, Aniket.Â
Do you mind to briefly explain what these two lines do? What about the snippets that are built in Mechanical, can I also pass them?Â
Thank you
Sincerely,
zhanh95
-
-
July 22, 2022 at 3:29 pm
Aniket Chavan
Forum Moderatoryou can create an extension (https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v222/en/act_dev/act_dev_defining.html) for Mechanical and have these functions inside the extension. Now if you load the extension by default, you can call these functions inside Mechanical Extensions by using these two commands.
If you have built snippets inside Mechanical, add them into your extension, and then you can call using the method I mentioned above from workbench page.
-Aniket
-
July 27, 2022 at 12:33 pm
-
-
- The topic ‘APDL for Workbench Automation’ is closed to new replies.
-
5824
-
1906
-
1420
-
1305
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.
