×
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

Output UDE Value in Post

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.

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}"
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

Cheers
  Steve Griffiths smile

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

Also are you upleveling your commands and calling them in Start of Program? If not the event isn't being seen by the post.

RE: Output UDE Value in Post

Oh and also if you are trying to get these variables in Start of Program they are not available until Start of operation even if the UDE is set on the top level program folder.  

RE: Output UDE Value in Post

(OP)
Thanks for the advice everyone!
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 smile

If you want to make apple pie from scratch, first you must create the universe!

RE: Output UDE Value in Post

This is from an old thread that I responded to. Take a look at the file. What is meant by upleveling is it brings the proc up to the top(or whatever desired by using a different # than 0 but in post seems to always be 0) level of the stack. You don't have to fully understand it but it makes the event handler(the custom command with the uplevel in it) seen by the post when the event when the ude is used. You must call this or put the command in the Start of program area so this can happen. either way you do it whether it is used at time of event or whether you hold the variables  and then use the output command. See if you can make sense of it and if you can't I am sure someone or myself will help you out. I ain't the kingfish of this stuff and there are alot of knowledgeable people out here on the net.

 

RE: Output UDE Value in Post

(OP)
Thanks shags72
  I will give it a go and see what happens. That example seems to make sense now!!!
 

Cheers
  Steve Griffiths smile

If you want to make apple pie from scratch, first you must create the universe!

RE: Output UDE Value in Post

No problem Steve, I hope the file helps get things in line for ya.

RE: Output UDE Value in Post

(OP)
Got it working!
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 smile

If you want to make apple pie from scratch, first you must create the universe!

RE: Output UDE Value in Post

Glad I could help. I did put an er in on having the ude's set on program header come out in Start of Program, which is where any logical person would think they would be available, but I don't think I have heard back on it yet.

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