Importing CSV file to TABLED1 curve

Akhil_22546
Akhil_22546 Altair Community Member
edited March 7 in Community Q&A

Hello Community, 

I would like to import multiple csv files into TABLED1 curves for each file but I am unable to find the command to mention in the tcl file as i need to automate it. 

Thanks for your help in advance.

Answers

  • Rishabh Awasthi_20948
    Rishabh Awasthi_20948
    Altair Employee
    edited March 7

    Hello Akhil 

    I would recommend the following steps : 

    1. Create a curve using Card Image : TABLED1 

    2. Add some dummy  X, Y points in curve editor. 

    This should give you the commands for the above steps in the command.tcl . You can view the commands from Edit -> Command Files. 

    Commands to read points are mentioned below (https://help.altair.com/hwdesktop/hwd/topics/reference/hm/_curveaddpoint.htm)

    *curveaddpoint 20024 0 0 0 

    *curveaddpoint 20024 0 0 0

    The next step will be write a .tcl code to read a .csv file and save the X and Y co-ordinates in a list. Then you can iterate over the X,Y co-ordinates list and use *curveaddpoint to add individual points to the curve. 

    Another loop would be for the  number of curves you wish to create which will depend on the number of .csv files