GDL
About building parametric objects with GDL.
SOLVED!

Limit editable hotspot movement to arbitrary values

jc4d
Expert

Hello,

 

 I would like to have a editable hotspot to move only by given values but obviously I get a numeric error when I check the script.

jc4d_1-1649830683592.png

 

 

Is there a way to "limit" the hotspot's movement to the given values only?
Practical example 🙂

jc4d_0-1649830404887.png

 

On the parameters tab I have this:

VALUES "Height", '1420', '1580', '1880', '2120', '2280', '2990'

 

On Master:

unID = 1

 

On the 3D script

HOTSPOT 0,0,0, unID, Height, 1+128
unID = unID+1
HOTSPOT Height,0,0, unID, Height, 2
unID = unID+1
HOTSPOT -1,0,0, unID, Height, 3+128
unID = unID+1

 

Juan.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Solution
Barry Kelly
Moderator

The hotspot movement is a length, so your 'Height' parameter needs to be a 'length' type and not 'text' type.

The value list will be lengths in meters with not quotes ...

 

VALUES "Height", 1.420, 1.580, 1.880, 2.120, 2.280, 2.990

 

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

View solution in original post

Solution
Lingwisyer
Guru

You could use Range and Step to do something along the lines of

 

VALUES "Height" range [1, 3] Step 1, 0.2

 

 

Ling.

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

View solution in original post

7 REPLIES 7
Solution
Barry Kelly
Moderator

The hotspot movement is a length, so your 'Height' parameter needs to be a 'length' type and not 'text' type.

The value list will be lengths in meters with not quotes ...

 

VALUES "Height", 1.420, 1.580, 1.880, 2.120, 2.280, 2.990

 

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

Ohh, that easy, thank you. I need to take a break 😅

jc4d
Expert

I hope is ok to ask another question here since it is somewhat related. If not the mods are free to move it to a new topic.
Is it possible to give a max and min lenght limits to the hotspot and define the movement steps?

 

Juan.

Solution
Lingwisyer
Guru

You could use Range and Step to do something along the lines of

 

VALUES "Height" range [1, 3] Step 1, 0.2

 

 

Ling.

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

Thank you, sadly I get an error:

jc4d_0-1649836841701.png

 

Juan.

Probably bad syntax on my part. I have not used the values command with range and step before. Updated previous post with what I think is the correction. Had an extra comma.

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

Fantastic, thank you 🙂

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!