×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

UG NX3 Post Builder tk_messageBox
3

UG NX3 Post Builder tk_messageBox

UG NX3 Post Builder tk_messageBox

(OP)
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

RE: UG NX3 Post Builder tk_messageBox

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

RE: UG NX3 Post Builder tk_messageBox

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

RE: UG NX3 Post Builder tk_messageBox

(OP)
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.

RE: UG NX3 Post Builder tk_messageBox

Why not have them make the program name O1234 and then use the value of group_name to output the program ID.

RE: UG NX3 Post Builder tk_messageBox

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources