Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-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
Joined
Oct 4, 2009
Messages
51
Location
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
 
Wait I am assuming these are ude's.
 
Sorry, my fault.
myVar is simple PB variable. not UDE
 
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
 

proc1 is not being called before proc2 or they are being called in a different namespace.

 
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.

Part and Inventory Search

Sponsor

Back
Top