General Mechanical

General Mechanical

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

Reading Results from Command Object

    • imraan.bokhari
      Subscriber

      Hi Everyone

      I have been trying to find the code used to read the results written in a command object script. I am using the static structural module and an example of the desired result is from "my_rotx=ROTX(RemotePoint)". In the Solution portion of the tree my command file shows the results, although using ACT python I'm unable find a way to save those results to a variable so I can output them into a csv file.

      An exmaple of the code I'm looking for may look like this.

      CMD = ExtAPI.DataModel.GetObjectById(724)  # this is the object ID of the command object named "Deformations"

      variable_name = CMD.OutputResults(my_rotx)  # this is the line of code I am trying to determine

      Any advice is appreciated. Thank you.

    • mjmiddle
      Ansys Employee

      CMD.OutputParameters[index]
      par1 = CMD.OutputParameters[0]
      par1.Name
      par1.Value

    • imraan.bokhari
      Subscriber

      Perfect

      Thank you

Viewing 2 reply threads
  • The topic ‘Reading Results from Command Object’ is closed to new replies.