General Mechanical

General Mechanical

Topics relate to Mechanical Enterprise, Motion, Additive Print and more

Read data from txt with apdl commands inserted in tree

    • Luiza Oltean

      Hello everyone!

      I'm working in workbench mechanical (2022r2) in a coupled field module. I want to insert apdl commands in the tree to read a table and interpolate to get some results.
      I have a file (txt with values separated by comma)with element ids and for each element i have temperature and two parameters defined. Separately i have a 3D table with a result(val) based on temperature and the two parameters. !
      So in the table the value is defined as val1(param1,param2,temp).
      How can i read my file and interpolate on the table with apdl commands inserted in the tree? I am new to apdl.
      Is there a way to do this with mechanical scripting?

      *DIM,mytable,TABLE,numlines,4 ! table array to hold data

      this is what i used. i know it's not defined properly but i can't figure out how to define it.
      Any help is much appreciated!

    • Ashish Khemka
      Forum Moderator


      Please see if the following links help:

      External Data (

      How to access the ANSYS Online Help


      Also, search internet for topics titled:

      The *TREAD Command and Comma-Separated Values (CSV)

      Using External Data in ANSYS Mechanical to Tabular Loads with Multiple Variables


      Please see if these help.


      Ashish Khemka

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