Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

UG NX3 Post Builder tk_messageBox 3

Status
Not open for further replies.
Jan 18, 2007
8
Hello friends,
I am new to UG NX3 PostBuilder. I want a messageBox which will open when the user run the post processor from NX3. For that I made a new custom command and my simple program is

set answer [tk_messageBox -message "Really quit?" -type yesno -icon question]
switch -- $answer {
yes exit
no exit
}

This program works well inside the PostBuilder. But when making NC data from the UG application, some error message will be displayed. The error message is

Received an errror 1770002
Filename: D:\ugnx30\sandbox\src\camsmom\no\ind\mom_tcl_definitions.c line numver:492
Error message: Error received in do_event. Event Handler: < My post file path, Event name:

I dont know How to rectify the error. Is the answer ( set command ) variable must be declared ? In which place the declaration can be made ?

This is my first try. But really i want to get some numeric data which will be output to the NC Data file. If anybody knows, please help me.

Please reply me briefly.

Thank you in advance.

Kindest Regards,
Srinivasan.C
Japan
 
Replies continue below

Recommended for you

Hi Srinivasan,

What would possibly solve your problem is to initiate the tkwish from nx then call your little tk program.

With kind regards,

Jelmer
 
hi
insert this script into your tcl script
#------------------------------
#run wish (TK shell)
#------------------------------
set cam_aux_dir [MOM_ask_env_var UGII_CAM_AUXILIARY_DIR]
set cam_shopdoc_dir [MOM_ask_env_var UGII_CAM_SHOP_DOC_DIR]
set ug_wish "ugwish.exe"
set title ""
set msg ""

exec ${cam_aux_dir}$ug_wish ${cam_shopdoc_dir}yourTKscript.tcl $title $msg
#------------------------------
#end of run wish (TK shell)
#------------------------------


----
kukelyk
 
Hi kukelyk & jelmera,
Thanks a lot for your information. Sorry for my delayed reply. I was out of station for the last two weeks.

I inserted your run wish script into my simple tk_messageBox
program. But the NX produced some error. I tried many times and finally i got the output.

First i make a custom command to run the run_wish ( your script only ) and i write a separate tk_messageBox program as a tcl program.then call the tcl program from the run_wish. i got the output. Is this way correct?

Actually i want to open a input box in which the program number ( O number ) is input which will open when the user run the post processor form NX3 ?

Is this possible ? Please reply ASAP.

Reply me briefly.
Thank you in advance.

Kindest Regards,
Srinivasan C
Japan.
 
Why not have them make the program name O1234 and then use the value of group_name to output the program ID.

 
Thanks joycejo.

This way also useful while making the O number. But the file name also the same as O number.

I want to specify separate file name and the O number. So i need to open an input box.

Thank you in adavance.

Kindest Regards,
Srinivasan C
Japan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor