×
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

UDE Variable output in shop doc

UDE Variable output in shop doc

UDE Variable output in shop doc

(OP)
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

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]
It falls over... Yet the following substituted for the last line works

CODE

  set AED_Min_X [format $AED_Format "10.54321"]
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 smile

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

RE: UDE Variable output in shop doc

In your logfile is it saying the variable doesn't exist? I am not sure if UDE variables are available in shop docs. If that is true then setting the variable before outputting, or just replacing it with a value as you did should, work then. Are you on the GTAC website? There are threads on this same question. I don't use shop docs so don't know much about them. Good Luck.

RE: UDE Variable output in shop doc

UDE variables that are collected in the NX are available.

Variables that are produced as part of the OUTPUT of the UDE in the post are not available. You have to postprocess to get those variables.

The easiest thing is to turn on the review tool in your shopdocs and look at the events and variables being provided. The lines to do this are in the OOTB samples, but commented out.

Mark Rief
Product Manager
Siemens PLM

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