🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Hypermesh doesnt find my file i used in a tcl script

User: "Torben0159"
Altair Community Member
Updated by Torben0159

Hello,


first of all im new to Hypermesh and all the scripting. I made a tcl script, which reads a file (like .txt .UFF) and creates nodes from coordinates mentioned in the file. Everything works perfect in the tclsh-environment, it looks like this:


% set fp [open 'test.UFF' r]
file5e9730
% set file_data [read $fp]
1 1 1 1 10 0 0
1 1 1 1 0 10 0
1 1 1 1 0 0 10


I skipped the rest of the code because I think its not necessary. If I execute the script in Hypermesh I get the following error:


couldn't open 'test.UFF': no such file or directory


If I dont read the data file and define the matrix shown above manually, everything is good. So why doesnt Hypermesh find my file? Its definitely in the folder where I start the session from. I hope my problem is clear and someone can help me.

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    Maybe try with full path of file, for example 'C:/Temp/test.UFF' instead of 'test.UFF'

     

    User: "Torben0159"
    Altair Community Member
    OP
    Updated by Torben0159

    sry I didnt mention this I have tried this already, same error. What I find weird is that Hypermesh apparently skips the '\'.

     

    My error message:

    couldn't open 'C:UsersNutzerDocumentsStudiumzz_IAVz_TestSkript_einlesen    est.UFF': no such file or directory

     

    My line in the script:

    'C:\Users\Nutzer\Documents\Studium\zz_IAV\z_Test\Skript_einlesen\test.UFF'

     

    User: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    Try:

     

    'C:/Users/Nutzer/Documents/Studium/zz_IAV/z_Test/Skript_einlesen/test.UFF'

     

    User: "Torben0159"
    Altair Community Member
    OP
    Updated by Torben0159

    It worked, thank you very much!