2025-08-21 08:26 PM
I’m creating a custom object that is made up of a certain number of elements. This quantity is calculated inside the 3D script using a WHILE…ENDWHILE loop. Inside this loop, I have a counter variable that is incremented by 1 each time the loop runs, so at the end I know how many elements were generated. What I would like to do is expose this quantity to the user by writing it into a parameter.
However, since the Parameter Script runs before the 3D script, the counter value is not yet available there. The PARAMETERS command in the Parameter Script gives me an “uninitialized variable” error message.
What is the recommended workflow if you want to expose a value to the user that depends on calculations normally done in the 3D script, without duplicating all the same loops and calculations in the Master Script?
Operating system used: Mac Apple Silicon Sequoia
Solved! Go to Solution.
2025-08-22 03:32 AM
@Durval wrote:
What is the recommended workflow if you want to expose a value to the user that depends on calculations normally done in the 3D script, without duplicating all the same loops and calculations in the Master Script?
You will need to do the calculations in the master script.
So you will need the While/Endwhile in the master script that does just the count, and another While/Endwhile in the 3D that does just the elements but not the count.
Any calculations done in the master script are available to all scripts, so you could also use it for the 2D.
Or you can actually place the 3D elements in the master script as well and have nothing in the 3D script.
Barry.
2025-08-22 03:32 AM
@Durval wrote:
What is the recommended workflow if you want to expose a value to the user that depends on calculations normally done in the 3D script, without duplicating all the same loops and calculations in the Master Script?
You will need to do the calculations in the master script.
So you will need the While/Endwhile in the master script that does just the count, and another While/Endwhile in the 3D that does just the elements but not the count.
Any calculations done in the master script are available to all scripts, so you could also use it for the 2D.
Or you can actually place the 3D elements in the master script as well and have nothing in the 3D script.
Barry.
2025-08-22 08:16 AM
If you decide to put 3D elements in the Master Script, add a GLOB_VIEW_TYPE or what ever the command that superseded it was to limit when it is run.
| AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
| Self-taught, bend it till it breaks | Creating a Thread |
| Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |