cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

the variable extracted from combo box is not recognized in function definition. Kindly help me

MH_10592278
2-Guest

the variable extracted from combo box is not recognized in function definition. Kindly help me

MH_10592278_0-1688460831403.pngMH_10592278_1-1688460855345.png

As you see from the above snips the zmin is extracted from combo box of terrain category but is not recognized in the cr(ze) program.  

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

The problem is subtle. 

Prime goes through the sheet first to evaluate global variables only designated with global equal sign.

Prime then goes through the file a second time from top to bottom left to right evaluating normal equal sign ":=".

z.min is only defined on the second pass so global definition cannot see zmin.

 

Solution is to define things with ":=" while working top to bottom, left to right.

For instance Kr is not defined before function cr(ze)

 

If it is necessary to use a globally defined function define all variables as parameters of the function.

Capture4.jpg

Cheers

Terry

 

View solution in original post

2 REPLIES 2

Hi,

The problem is subtle. 

Prime goes through the sheet first to evaluate global variables only designated with global equal sign.

Prime then goes through the file a second time from top to bottom left to right evaluating normal equal sign ":=".

z.min is only defined on the second pass so global definition cannot see zmin.

 

Solution is to define things with ":=" while working top to bottom, left to right.

For instance Kr is not defined before function cr(ze)

 

If it is necessary to use a globally defined function define all variables as parameters of the function.

Capture4.jpg

Cheers

Terry

 

Yah , Thank you for your help.

Top Tags