Output UDE Value in Post
Output UDE Value in Post
(OP)
I have been able to use info in thread561-249010: Stock size variable to output block form in post processor
to output expression value in the post.
Now I am trying to use a UDE (User Defined Event) to input the variables and use these in the post.
I can't seem to be able to pull the values into the post, anyone know what I am doing wrong???
I have a custom command that I call in Program Start Sequence.
UDE Parameters are AED_Min_X etc... in EVENT Block_Form with POST_EVENT "Blk_Form"
Does anyone know how to get the UDE values to work???
Thanks in advance
to output expression value in the post.
Now I am trying to use a UDE (User Defined Event) to input the variables and use these in the post.
I can't seem to be able to pull the values into the post, anyone know what I am doing wrong???
I have a custom command that I call in Program Start Sequence.
CODE
global AED_Mn_X
global AED_Mn_Y
global AED_Mn_Z
global AED_Mx_X
global AED_Mx_Y
global AED_Mx_Z
global AED_Format
set AED_Format "%#4.1f"
#Set variables to expression values
[MOM_ask_ess_exp_value AED_Min_X]]}
set AED_Mn_X [format $AED_Format [MOM_ask_ess_exp_value AED_Min_X]]
set AED_Mn_Y [format $AED_Format [MOM_ask_ess_exp_value AED_Min_Y]]
set AED_Mn_Z [format $AED_Format [MOM_ask_ess_exp_value AED_Min_Z]]
set AED_Mx_X [format $AED_Format [MOM_ask_ess_exp_value AED_Max_X]]
set AED_Mx_Y [format $AED_Format [MOM_ask_ess_exp_value AED_Max_Y]]
set AED_Mx_Z [format $AED_Format [MOM_ask_ess_exp_value AED_Max_Z]]
##Pull values from UDE - doesn't work???
# set AED_Mn_X [format $AED_Format [MOM_AED_Min_X]]
# set AED_Mn_Y [format $AED_Format [MOM_AED_Min_Y]]
# set AED_Mn_Z [format $AED_Format [MOM_AED_Min_Z]]
# set AED_Mx_X [format $AED_Format [MOM_AED_Max_X]]
# set AED_Mx_Y [format $AED_Format [MOM_AED_Max_Y]]
# set AED_Mx_Z [format $AED_Format [MOM_AED_Max_Z]]
#Output Stock Sizes
MOM_output_literal "BLK FORM 0.1 Z X${AED_Mn_X} Y${AED_Mn_Y} Z${AED_Mn_Z}"
MOM_output_literal "BLK FORM 0.2 X${AED_Mx_X} Y${AED_Mx_Y} Z${AED_Mx_Z}"
global AED_Mn_Y
global AED_Mn_Z
global AED_Mx_X
global AED_Mx_Y
global AED_Mx_Z
global AED_Format
set AED_Format "%#4.1f"
#Set variables to expression values
[MOM_ask_ess_exp_value AED_Min_X]]}
set AED_Mn_X [format $AED_Format [MOM_ask_ess_exp_value AED_Min_X]]
set AED_Mn_Y [format $AED_Format [MOM_ask_ess_exp_value AED_Min_Y]]
set AED_Mn_Z [format $AED_Format [MOM_ask_ess_exp_value AED_Min_Z]]
set AED_Mx_X [format $AED_Format [MOM_ask_ess_exp_value AED_Max_X]]
set AED_Mx_Y [format $AED_Format [MOM_ask_ess_exp_value AED_Max_Y]]
set AED_Mx_Z [format $AED_Format [MOM_ask_ess_exp_value AED_Max_Z]]
##Pull values from UDE - doesn't work???
# set AED_Mn_X [format $AED_Format [MOM_AED_Min_X]]
# set AED_Mn_Y [format $AED_Format [MOM_AED_Min_Y]]
# set AED_Mn_Z [format $AED_Format [MOM_AED_Min_Z]]
# set AED_Mx_X [format $AED_Format [MOM_AED_Max_X]]
# set AED_Mx_Y [format $AED_Format [MOM_AED_Max_Y]]
# set AED_Mx_Z [format $AED_Format [MOM_AED_Max_Z]]
#Output Stock Sizes
MOM_output_literal "BLK FORM 0.1 Z X${AED_Mn_X} Y${AED_Mn_Y} Z${AED_Mn_Z}"
MOM_output_literal "BLK FORM 0.2 X${AED_Mx_X} Y${AED_Mx_Y} Z${AED_Mx_Z}"
Does anyone know how to get the UDE values to work???
Thanks in advance
Cheers
Steve Griffiths ![]()
If you want to make apple pie from scratch, first you must create the universe!





RE: Output UDE Value in Post
does the proc name match the name of the UDE?
for example if the event name is barpuller then the proc in the post would need to be named MOM_barpuller.
John Joyce
N.C. Programming Supervisor
Barnes Aerospace, Windsor CT
RE: Output UDE Value in Post
RE: Output UDE Value in Post
RE: Output UDE Value in Post
I'm not quite sure how to do this though...
The UDE.cdl file has an EVENT Block_Form
The post has PB_CMD_Block_Form which I want to call from the program start sequence to insert the block form at the start of the program.
How do I uplevel the command? Is this in the post or UDE?
Thanks Again
Cheers
Steve Griffiths
If you want to make apple pie from scratch, first you must create the universe!
RE: Output UDE Value in Post
RE: Output UDE Value in Post
I will give it a go and see what happens. That example seems to make sense now!!!
Cheers
Steve Griffiths
If you want to make apple pie from scratch, first you must create the universe!
RE: Output UDE Value in Post
RE: Output UDE Value in Post
Thanks to all for the valuable insight that put me on the correct track.
Annoying not being able to use the Start_of_Program section, but I got the job done!
Thanks again everyone
Cheers
Steve Griffiths
If you want to make apple pie from scratch, first you must create the universe!
RE: Output UDE Value in Post