Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Correct variable definition in PB 1

Status
Not open for further replies.

i0wa

Industrial
Oct 4, 2009
51
0
0
EE
Hi everyone!

MB it will be a silly question, but... I have 2 processes within which the one variable is used.
proc MOM_myProc1 {} {
global myVar
set myVar 1
}

proc MOM_myProc2 {} {
global myVar
MOM_abort "$myVar"
}

in the log it is writen than "no such variable 'myVar'" in process 2
what I've made wrong?

Thanks in advance
 
Replies continue below

Recommended for you

Where are you using MOM_myProc1 ?

Is this activated by a UDE?




John Joyce
N.C. Programming Supervisor
Barnes Aerospace, Windsor CT
NX6.0.5.3
 
Why not just use a custom command? Or are you writing in tcl file and not using post builder. Ok Where and how is the myVar being set? If it is never set then it will not be there.
 
joycejo, proc1 is activated with ude.
mouldy1, proc1 and proc2 are in the start of the program. I think, if the process is initialized once, it will be also available during the whole post processing, isn't it?
 
if proc1 is activated with ude.
what is activating proc2?


John Joyce
N.C. Programming Supervisor
Barnes Aerospace, Windsor CT
NX6.0.5.3
 
There's (one of) your problem! Ude's are not available in start of program. Though they are available in start of path. And again if a var is in a ude then it will be mom_myVar when it gets to the post. You did call it myVar in the param field, right? Then as joycejo asks, How is proc 2 getting called? There is no callout for it in proc 1. Why don't you tell us what you are trying to accomplish and then we can tell you the best way to get it done? OK?
 
Status
Not open for further replies.
Back
Top