General Mechanical

General Mechanical

Output Parameter for Python Code Result Object

    • keenanr

      Wondering how to create a parametrized output (that can be fed to Design Explorer) from a python code result object?


      Similar to how an APDL snippet can have output variables prefixed with "my_", and can then be parametrized. 



    • Erik Kostson
      Ansys Employee


      You can add act code like this say to create parameter of largest defection which is the first result on the solution tree (this is just for reference so you need to adjust as needed):

          myMax = ExtAPI.DataModel.Project.Model.Analyses[0].Solution.Children[1]


      All the best



      • keenanr

        Thanks! Would this only work for referencing data already in the solution tree?


        My goal is to perform calculations on input parameters and expose that result as an output parameter. The output would take no input from the analysis results. 

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