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!

Using through coolant in NX to post into program

Status
Not open for further replies.

blaineam

Aerospace
Jun 5, 2012
29
0
0
US
If you right click on a tool and go to object then custumize and go to customizable items in the drop down. Then you can add coolant through to your tool parameters as a check box. I am trying to add a custom cammand that looks at this box and if it is checked then add through coolant. If not checked then do nothing.

Im not sure how to have the post look directly at this one check box within a custom command?

If anyone knows of a way to accomplish this i would really appreciate it!

Thanks.
 
Replies continue below

Recommended for you

Ya Thats what i have so far. I kind of threw this together but not really sure how to make sense of it to get it to work. Im not sure the logic to put into it or the order etc to use or not to use.

global mom_tool_coolant_through

if [info exists $mom_tool_coolant_through] {
set mom_tool_coolant_through $M88
}

I would appreciate any further help.

Thanks.
 
When you set a variable in Tcl do not put the $ in front. This is only used when outputting the value of a variable

John Joyce
N.C. Programming Supervisor
Barnes Aerospace, Windsor CT
NX6.0.5.3
 
Oh ok. Does this look some what like the right command? I tried it just without the $ and still cant get it to produce the M code. Im sure i haven't written it right.
 
Ok Nevermind... So i thought i had figured it out but it is just outputting the M code whether the through coolant is on or off.

This seems like it shouldnt be that difficult... I just cant wrap my arms around it.
 
Here are the two ways i have tried it because im not sure of any other way to put the logic together.

This way it just doesnt output an M code.

global mom_tool_coolant_through

if [info exists mom_tool_coolant_through] {
set mom_tool_coolant_through "M88"
}


This way it outputs an M code whether i have the coolant through button selected or not.

global mom_tool_coolant_through

if [info exists mom_tool_coolant_through] {
set mom_tool_coolant_through "M88"
}

I appreciate any help you can give.

 
Both of those examples are the same. I would think that the variable would either be 0(false) or 1(true) coming out of NX and that you would have to do something like the following though I wouldn't use that var to drive the code. Use the var that is actually in the coolant M block.. I thought it was mom_coolant_code or something like that.

global mom_tool_coolant_through

if {[info exists mom_tool_coolant_through] && $mom_tool_coolant_through == 1} {
set mom_tool_coolant_through "M88"
}

 
Status
Not open for further replies.
Back
Top