General Mechanical

General Mechanical

Accessing Design Point parameter from a Mechanical python script

    • Subscriber

      Hi,

      I have been using the python code feature to automatically export results from different design points runs. 

      I would like to save the files using some of the varying parameters described in the design points (the value for "P1" for example).

      How can I do this?

       

      I was able to access the design point number using the following code line:

          import os
          import wbjn
          dpn=wbjn.ExecuteCommand(ExtAPI,"returnValue(a+Parameters.GetActiveDesignPoint().Name)",a="DP")

      credit: https://www.linkedin.com/pulse/script-tip-friday-python-code-object-mechanical-

       

    • Aniket
      Ansys Employee
      • Subscriber

        Thank you.

        It's another way to perform the export, but I don't see anything specifically about accessing the design point parameters.

        Is there a way to access the design point parameters from ANSYS Mechanical?

Viewing 1 reply thread
  • You must be logged in to reply to this topic.