Is there API name for the variables created from APDL


Hello Team,

We automatically read input and outputs from Ansys Mechanical project. everything worked well till we decided to estimate some results based on APDL script. For some reason the APIname is absent for APDL variable added to project tree (see the attached pictures)
Or may be we are doing creating of APDL variable incorrectly?


  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 208
    First Answer First Comment 5 Likes First Anniversary

    I don't think there is a direct APIName for the output parameters, because they are dependent on the APDL code. Typically, you would access them from a list:

    solution0 = ExtAPI.DataModel.Project.Model.Analyses[0].Solution
    apdl_command0 = solution0.GetChildren[Ansys.ACT.Automation.Mechanical.CommandSnippet](True)[0]
    output0 = apdl_command0.OutputParameters[0]
    variable_name = output0.Name
    value = output0.Value
    print variable_name , ' = ', value
  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 804
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member

    This is a duplicate of PyMechanical Issue #604