GDL
About building parametric objects with GDL.

Update A with custom parameter

jc4d
Expert

Hello,

 

I have an object with a custom values for the width.

 

When I place the object, the value that shows in the toolbar is 1000 no matter what is the right width of the object. Therefore, my question is if it is possible to update that value in the toolbar to shoe the real width of the object?

jc4d_0-1654838449251.png

 

Paremeters:

VALUES "mod_width" range [0.3, 2.0] Step 1, 0.005

 

Master:

A = mod_width

But didn't work

Juan.

 

1 ACCEPTED SOLUTION
5 REPLIES 5
Solution
Barry Kelly
Moderator

Instead of using 'mod_width', you could just have used 'A'.

 

Or you now need to say...

 

A = mod_width

PARAMETERS A = A

 

The first line sets the value for 'A' that the scripts will use, but the second line sets the parameter that the user sees.

 

But that is not the end of it.

If the user now adjusts 'A', nothing will happen to the width - because you are not changing 'mod_width'.

You could ...

LOCK "A"

So the user can see 'A' but not change it.

 

That is why it is best to just use 'A' instead of 'mod_width'.

 

VALUES "A" range [0.3, 2.0] Step 1, 0.005

 

 Anywhere else in your scripts that uses 'mod_width', just change it to 'A'.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Thank you, I don't know why I was "afraid" on using A... maybe is because what could happen if I have a dropdwon list of sizes?

 

Another question related, the same logic applies to ZZYZX?

 

Juan

Sure.

Use 'A' for the overall width.

'B' for the overall depth.

And 'ZZYZX' for the overall height.

 

They can all have a VALUE list if you want to choose pre-set sizes.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Lingwisyer
Guru

Value lists also work with Hotspots which will allow you to change between presets without even entering any dialogue.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 

Interesting, I will take a look. Thanks

 

Juan

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!