Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop-up dialog box /tcl/NX8

Status
Not open for further replies.

coyote2013

Mechanical
Nov 1, 2013
4
0
0
HU
Hi I was wondering if anyone ever used pop up dialog box for the user to select a file to open in post processor (tcl)? I need to save the path and the name of the file too. I’m using NX8 and I tried tk_getOpenFile command but doesn’t seems to work in NX8. If anyone has different solution or a working example with tk_getOpenFile that would be a great help.
 
Replies continue below

Recommended for you

You want to link postprocessing into documentation, aren't You?
I had a journal, what reads the template_post.dat, and make a list from its rows.
There was a combobox, what is a free widget for tcl/tk, where the user can select the needed post from the above list.
After the selection, it is easy to cycle thru the nc_programs, and write them with the selected post.
Do You use postprocessor, or shopdoc?
I think it is easier to define the selectable posts in the template_post.dat


----
kukelyk
 
I’m familiar with the use of template_post.dat. What i want is a bit different! While i use the post processor (when it’s running) i want to communicate with the user. So for my post processor i need information from the model (what i can get from the mom constants like tool path time etc.) and i also need information from the user what has already stored in a file (for example in a txt file). But i also want to let the user to store that file where ever he wants. That is why i need a process to get the path and the name of the (txt) file.
 
I tried 'tk_getOpenFile' in ugwish (NX 8.0\MACH\auxiliary\ugwish.exe), and it worked.

Code:
global filename
set filename [tk_getOpenFile]
puts $filename
note that it is only a file selection, You are to read the file for its content


----
kukelyk
 
"information from the model"
i think it is better to store all data in the manufacturing file, You can store text data in program/operation attribute, or in user defined events etc.

----
kukelyk
 
Every time when I’m running tk_getopenfile (when I tried your commands too) I got this message:
"Error: invalid command name "tk_getOpenFile" while executing"
Do i need anykind of extra library or plugin?
 
Status
Not open for further replies.
Back
Top