Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

APDL for Workbench Automation

    • zhanh95
      Subscriber

      Dear 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

    • Aniket Chavan
      Forum Moderator

      You 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

      How to access Ansys help links

      Guidelines for Posting on Ansys Learning Forum

      • zhanh95
        Subscriber

        Thank 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

    • Aniket Chavan
      Forum Moderator

      you 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

      How to access Ansys help links

      Guidelines for Posting on Ansys Learning Forum

      • zhanh95
        Subscriber

         

        What if the snippets I used are Ext.API snippets that were preloaded in Ansys Mechanical? How can I access those?

        Below is one of the example of the snippet I used:

        Thank you

        zhanh95

         

Viewing 2 reply threads
  • The topic ‘APDL for Workbench Automation’ is closed to new replies.
[bingo_chatbox]