Importing nodal coordinates from excel/text file

Hello,

I have a liste of coordinates in an excel/ text file that I would like to use when constructing a model in sofimsha. Is it possible to import these directly into sofimsha in order to use them in a loop command? These nodes simulates physical rail irregularies. All coordinates are obtained from tables.

Best regards,
Fredrik

I would just do two steps:

  1. add a column with node numbers
  2. add a header

For example:

NODE NO X Y Z
101 0.796 1.235 -0.680
102

This is already a CADINP-input for SOFIMSHA. Just copy it into your file.

Regards
gmay

Hello gmay,

Thank you for your reply. I was thinking about doing the same thing. However, I was hoping to implement this in a manner that avoids generating a very large teddy file (cleaner look), for example by looping over the node coordinates stored in an external database. In my particular example there will be > 1500 nodes that have unique coordinates.

Best regards,
Fredrik

One option if you want a cleaner file to work with:

  • Generate a teddy file just like @gmay suggested, but only with the coordinates. E.g.:
    NODE NO X Y Z
    101 0.796 1.235 -0.680
    102 …
  • Save the file in the same folder as your project, e.g.: nodes.dat
  • Include the file in your main project file, so your sofimsha code looks something like:
    NODE NO X Y Z
    #Include nodes.dat

→ Your main file is smaller and easier to work with
→ The nodes file is easily interchangeable (coordinate updates, testing variants, etc)

Hello sfr,

Thank you for responding. I tried doing what you suggested and it works well for my setup. Thank you for your help!

Best regards,
Fredrik