postbuilder and tcl
postbuilder and tcl
(OP)
hi
I want to write a condition in postbuilder
This means:
I made an event (UDE)
####################
POST_EVENT "rev"
UI_LABEL "no_program"
PARAM nr_zm
.....
.....
###################
and I need for generating code nc, NX detect whether it is active or not
(if not Active then stop with the message that it is missing)
how to do it?
I want to write a condition in postbuilder
This means:
I made an event (UDE)
####################
POST_EVENT "rev"
UI_LABEL "no_program"
PARAM nr_zm
.....
.....
###################
and I need for generating code nc, NX detect whether it is active or not
(if not Active then stop with the message that it is missing)
how to do it?





RE: postbuilder and tcl
proc MOM_rev {} {
global mom_nr_zm
if {![info exists mom_nr_zm]} { MOM_output_to_listing_device "PARAMETER NOT DEFINED"
MOM_abort "PARAMETER NOT DEFINED"
return }
}
Place the procure at the start of program event or where ever you are adding the UDE
John Joyce
N.C. Programming Supervisor
Barnes Aerospace, Windsor CT
NX6.0.5.3
RE: postbuilder and tcl
thank`s for reply!!!
I do not know what I'm doing wrong, but does not work
Maybe you manage to find my mistake
### This is my UDE:
EVENT rev_67
{
POST_EVENT "rev"
UI_LABEL "no_program"
PARAM no_zm
{
TYPE o
DEFVAL "-"
OPTIONS "-","rev.A","rev.B","rev.C"
UI_LABEL "rev no"
}
PARAM name
{
TYPE o
DEFVAL "-"
OPTIONS "-","param 67","param fast 2/4","para fast 4/4"
UI_LABEL "name rev"
}
}
####
and this is my procedure in post builder (I create this procedure in Start of program)
#####
proc PB_CMD_no_program {} {
uplevel #0 {
proc MOM_rev { } {
global mom_no_zm mom_name
if {![info exists mom_no_zm]} { MOM_output_to_listing_device "PARAMETER NOT DEFINED"
MOM_abort "PARAMETER NOT DEFINED"
return }
if {![info exists mom_name]} { MOM_output_to_listing_device "PARAMETER NOT DEFINED"
MOM_abort "PARAMETER NOT DEFINED"
return }
MOM_output_literal "($mom_no_zm - $mom_name)"
}
}
}
#####
With such a procedure I always gets done nc code with variables and without
(sorry for my English :) )
thank`s !!!!
RE: postbuilder and tcl
RE: postbuilder and tcl
if {![info exists mom_no_zm] || $mom_no_zm == -} {
MOM_output_to_listing_device "PARAMETER REV NO NOT DEFINED"
MOM_abort "PARAMETER NOT DEFINED"
return
}
if {![info exists mom_name] || $mom_name == -} {
MOM_output_to_listing_device "PARAMETER NAME REV NOT DEFINED"
MOM_abort "PARAMETER NOT DEFINED"
return
}
RE: postbuilder and tcl
but I do not have what I need :(
now I have that:
If I choice my event "no_program" I gets message "PARAMETER NOT DEFINED"
and
if I do not choice that event I get normal nc code
I dont`t understand this :(
I need to have this message if I not will choose a variable "no_program" from list UDE in NX.
maybe someone has a tested procedure and could share it?
Please & Thank `s!!
I work in PB 6.03
RE: postbuilder and tcl
RE: postbuilder and tcl
ok????
thank you very much!!!!
RE: postbuilder and tcl
that link to me files:
http
RE: postbuilder and tcl
RE: postbuilder and tcl
I made as you say but unfortunately, still does not stopped :(
http:
please contact me by e-mail
ugsnx@o2.pl
will be easier for me to send files
thx very very much!!!!
RE: postbuilder and tcl
RE: postbuilder and tcl
I make it last
I did not hit it without your help
RE: postbuilder and tcl
RE: postbuilder and tcl
I want to do like Marcinell
But I do not go
I want to nx detected that when I did not use in the program event (UDE = Siemens_Cycles.cdl - EVENT high_speed_setting "SINUMERIK 840")
looks like such a procedure?
I work in NX6.05 & PB 6.03 & postprocessor with templates SINUMERIK from PB
I tried the procedure:
if {![info exists mom_command_status] || $mom_command_status == "Inactive"} {
MOM_output_to_listing_device "PARAMETER...." MOM_abort "PARAMETER NOT DEFINED"
return
}
but this is not work
help me please
Thank you
RE: postbuilder and tcl
RE: postbuilder and tcl
I know what's going on
cheers