pracslipkerm
Mechanical
- Dec 17, 2008
- 58
Hi Everyone,
I have a UDE that gets the min and max dimensions in X,Y & Z that I output in the post to get the block form. I am now trying to get them out of the shop doc.
Here is the command out of post builder
In the shop doc when I try
It falls over... Yet the following substituted for the last line works
Anyone know what I am doing wrong???
Can I access the values AED_Min_X etc from the post???
If I enter a value instead of $mom_AED_Min_X it works...
Thanks in Advance
Cheers
Steve Griffiths
If you want to make apple pie from scratch, first you must create the universe!
I have a UDE that gets the min and max dimensions in X,Y & Z that I output in the post to get the block form. I am now trying to get them out of the shop doc.
Here is the command out of post builder
Code:
# This procedure formats variables from UDE and outputs block form in program
global mom_AED_Min_X
global mom_AED_Min_Y
global mom_AED_Min_Z
global mom_AED_Max_X
global mom_AED_Max_Y
global mom_AED_Max_Z
global AED_Min_X
global AED_Min_Y
global AED_Min_Z
global AED_Max_X
global AED_Max_Y
global AED_Max_Z
global AED_Format
global AED_Blk_Frm
#check if first call of procedure (Set to 0 in program start sequence)
if { $AED_Blk_Frm == 0 } {
#Format values as required
#set AED_Format "%#i"
set AED_Format "%#4.1f"
set AED_Min_X [format $AED_Format $mom_AED_Min_X]
set AED_Min_Y [format $AED_Format $mom_AED_Min_Y]
set AED_Min_Z [format $AED_Format $mom_AED_Min_Z]
set AED_Max_X [format $AED_Format $mom_AED_Max_X]
set AED_Max_Y [format $AED_Format $mom_AED_Max_Y]
set AED_Max_Z [format $AED_Format $mom_AED_Max_Z]
MOM_output_literal "BLK FORM 0.1 Z X${AED_Min_X} Y${AED_Min_Y} Z${AED_Min_Z}"
MOM_output_literal "BLK FORM 0.2 X${AED_Max_X} Y${AED_Max_Y} Z${AED_Max_Z}"
}
# Set variable to 1 to prevent output with every toolpath
set AED_Blk_Frm 1
}
In the shop doc when I try
Code:
global mom_AED_Min_X
global mom_AED_Min_Y
global mom_AED_Min_Z
global mom_AED_Max_X
global mom_AED_Max_Y
global mom_AED_Max_Z
set AED_Format "%#4.1f"
set AED_Min_X [format $AED_Format $mom_AED_Min_X]
Code:
set AED_Min_X [format $AED_Format "10.54321"]
Can I access the values AED_Min_X etc from the post???
If I enter a value instead of $mom_AED_Min_X it works...
Thanks in Advance
Cheers
Steve Griffiths
If you want to make apple pie from scratch, first you must create the universe!