GDL Parameter with text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2013-04-23 01:58 PM
I would like to create a parameter like integer but with text,
Like:
Option a: Left, Center, Right.
and then use it for my 3d script.
with integer i can only do it with 1, 2 or 3 not with text. Is there anyone that can help me please?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2013-04-23 02:20 PM
This can be done in the Parameter Script, in the GDL Reference Guide look at the VALUES command. In your case something like:
Values "Position" "Left", "Center", "Right"
David
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2013-04-23 02:31 PM
Thanks for the help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2013-04-23 02:53 PM
You need to create a parameter (Position in my example) and set its Type to Text. Note the use of quotes and commas (GDL is unforgiving). Post some screen shots of your main Library Part window (showing the parameters), Parameters Script and error message.
David
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2013-04-25 07:33 PM
!Dynamic hotspot to adjust length_variable along the x-axis
add 2
reference_point_x, reference_point_y
hotspot2 0, 0, hotspotIndex + 1, length_variable, 1 hotspot2 length_variable, 0, hotspotIndex + 2,
length_variable, 2
hotspot2 -1, 0, hotspotIndex + 3, length_variable, 3 hotspotIndex = hotspotIndex + 3
del 1
For instance what is hotspotIndex?
Thanks again!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2013-04-25 09:50 PM
Try this
unID = 1 !! X movement HOTSPOT 0, 0, 0, unID, varx, 1 : unID = unID+1 !base HOTSPOT varx, 0, 0, unID, varx, 2 : unID = unID+1 !move HOTSPOT -1, 0, 0, unID, varx, 3 : unID = unID+1 !reference !! Y movement HOTSPOT 0, 0, 0, unID, vary, 1 : unID = unID+1 !base HOTSPOT 0, vary, 0, unID, vary, 2 : unID = unID+1 !move HOTSPOT 0, -1, 0, unID, vary, 3 : unID = unID+1 !reference !! Z movement HOTSPOT 0, 0, 0, unID, varz, 1 : unID = unID+1 !base HOTSPOT 0, 0, varz, unID, varz, 2 : unID = unID+1 !move HOTSPOT 0, 0, -1, unID, varz, 3 : unID = unID+1 !referenceThis will give you three hotspots for the variable "vary", vary", and "varz"
AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2013-04-27 02:44 PM
luisfmoreira wrote:If you are using the A and B parameters (basic width and depth), then you don't need additional code, they are already inherently stretchable if used as the boundaries of the object.
Now I'm having problems creating hotspots that I can move and that change the A ou B parameter
David
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2013-05-02 10:42 PM
I will paste the code later, maybe someone can help me improve it! GDL is extremely flexible but it's a shame we can't edit it graphically (like with stretchable blocks in autocad!) but I'm enjoying it a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2013-05-10 06:20 PM

When I stretch it to the right it goes left! Any ideas
hotspotIndex=1
hotspot A, -0.06, 0, hotspotIndex + 1, SOCLD, 1
hotspot SOCLD, -0.06, 0, hotspotIndex + 2, SOCLD, 2
hotspot -A-SOCLD, -0.06, 0, hotspotIndex + 3, SOCLD, 3
hotspotIndex = hotspotIndex + 3
PRISM_ 4, HSOCL,
0.00, 0.00 , 24,
A + SOCLD, 0.00 , 24,
A + SOCLD, ES , 15,
0.00, ES , 15

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2013-05-11 11:36 AM
First of all, I can't understand why you added the A variable to your desired lenght.
try this:
hotspotIndex=1 hotspot 0, -0.06, 0, hotspotIndex + 1, SOCLD, 1 hotspot SOCLD, -0.06, 0, hotspotIndex + 2, SOCLD, 2 hotspot -1, -0.06, 0, hotspotIndex + 3, SOCLD, 3 hotspotIndex = hotspotIndex + 3 PRISM_ 4, HSOCL, 0.00, 0.00 , 24, SOCLD, 0.00 , 24, SOCLD, ES , 15, 0.00, ES , 15Then, well, I know this is only a sniplet of the code, but to start with the simplest, I suggest you to practice with the standard variables for length (A) width (B) and height (ZZYZX), instead of define your own (SOCLD, ES, HSOCL).
Finally, for very basic resize function, provided you used A,B,ZZYZX for the global sizes, one can use a macro provided by Graphisoft (is hidden in the standard library) with the simple command:
CALL "Resize_A_B_ZZYZX" PARAMETERS ALL
--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________