Jump to content
Sign in to follow this  

Hypermesh doesnt load a file im using in a tcl script

Recommended Posts



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, the file data gets imported and it looks like this:


% set fp [open "test.UFF" r]
% 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 Hypermesh session from. I hope my problem is clear and someone can help me.

Share this post

Link to post
Share on other sites

Just making it clear, '\' is a special character in TCL.

Anything after '\' is not evaluated as commands.


So, for folders you can use / like suggested, or instead of using quotes "  " for the string, use { }

Anything inside { } is not evaluated at all and is directly written.


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...