Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Limiting range of hotspot editing

matjashka
Advocate
OK, semi-stupid question: I have a piece od GDL that combines a straight line and an elbow.

The overall length is not supposed to be shorter than the elbow radius.

So I wrote this piece:
101:
IF overall_l < elbowrad THEN
overall_l=elbowrad
ENDIF
RETURN
...to correct the length so that the object won't get distorted. Either this is not the way to do it, or I'm putting this code in the wrong place, because I can move the hotspot so that the whole thing gets messed up anyway.

So, how should I limit the hotspot's range of movement?

Thanks!

Screen shot 2010-11-17 at 9.55.01 AM.png
Matt Krol [LinkedIn]
BHMS Architects and Planners, Chicago
AC 10 ... 26 USA
5 REPLIES 5
Frank Beister
Moderator
Try this in parameters script:
IF overall_l < elbowrad THEN
  overall_l=elbowrad
  PARAMETERS overall_l=overall_l
  ENDIF 
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
matjashka
Advocate
Thank you.
I placed this script in the Parameter Script section, but this generates an error in the object beyond the minimum point (only dot is shown on the plan). Is there any special way I must call this script?
Matt Krol [LinkedIn]
BHMS Architects and Planners, Chicago
AC 10 ... 26 USA
Frank Beister
Moderator
I thought overall... is a valid parameter. Can you post the complete script or the parameter list.

Not clear, where your shape is messed up.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Erich
Booster
You could also do this with a VALUES statement in the parameter script. Something like
VALUES "overall_l" RANGE[0, elbowrad)
I prefer this as it limits the range of movement when the hotspot is adjusted rather than just snapping back to the default over run value. To me this is better user feedback.
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
matjashka
Advocate
Thank you both guys.
The "reset" script is actually valid. The key was adding some extra length to the minimum, because I failed to acknowledge that certain values could not be zero. I searched through some Graphisoft objects and saw how the range[n,p] was used. But still I had to add some length to the minimum limit (1/4" in my case). Undefined "p" means "infinity" I guess.

So, this actually works:
values "return_type" `Simple U`, `Square U`, `Simple L`, `Square L`

values "overall_l" range[elbowrad+0.25",]

IF return_type=`Square U` THEN
values "wd" range[elbowrad*2+0.25",]
ENDIF

IF return_type=`Square L` THEN
values "wd" range[elbowrad+0.25",]
ENDIF
Below is the object that I plan to use as a simple fully parametric railing return solution, which I always had to put together from basic solids.

Thank you again!
Screen shot 2010-11-17 at 10.48.15 AM.png
Matt Krol [LinkedIn]
BHMS Architects and Planners, Chicago
AC 10 ... 26 USA