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

Object Origin Keeps Moving

Anonymous
Not applicable
I have written an object in which the lower-left corner is the anchor for the object. Using hotspots on the top and right, you can stretch it in the X or Y directions on the floor plan. However, I set limits on how small the object can be stretched with code lines such as the following:

IF A < 30" THEN PARAMETERS A = 30"


Whenever this line kicks in, the object resizes, but it moves the lower left corner, keeping the position of the hotspot that was dragged. How can I lock the position of the lower left corner? I only want that corner to move if the user explicitly selects its hotspot.
6 REPLIES 6
Anonymous
Not applicable
Jay,
Is there a particular reason you want to use the "Parametes" command?
Wouldn't writing in the Master Script if A<30" then A=30" do the job?
Peter Devlin
Anonymous
Not applicable
Try using the RANGE setting. Such as:

VALUES `A` RANGE [30, 1000)

This has the cool effect of snapping automatically to permitted values. It's fun to play with and actually pretty useful too.
Anonymous
Not applicable
Jay,
Matthew is right the "values" command does the job.
Peter Devlin
Anonymous
Not applicable
Matthew wrote:
Try using the RANGE setting. Such as:

VALUES `A` RANGE [30, 1000)
Not quite what I was looking for. Perhaps a better explanation of what I'm trying to do.

The GDL I'm building will draw restroom stalls that conform to ADA. If you stretch the object in the A direction, you get more stalls and/or urinals. I want to keep people from stretching it smaller than an ADA compliant stall. So I used the simple statement "IF A < ada_min THEN PARAMETERS A = ada_min". Unfortunately, when this line of code executes it doesn't reposition the hotspot I was just dragging, it moves everything else (see graphic).

How can I get the hotspot labeled "H1" to stay where it is unless it is the hotspot being edited?
David Larrew
Booster
Jay,

To fix your specific problem try this:

IF A < 30" THEN A = 30"
PARAMETERS A = A

Or/And...

IF A < ada_min THEN A = ada_min
PARAMETERS A = A

Be sure this is in the "Master Script"
David Larrew, AIA, GDLA, GSRC

Architectural Technology Specialist

a r c h i S O L U T I O N S



WIN7-10/ OSX 10.15.7

AC 5.1-25 USA
Anonymous
Not applicable
I think you will have problems as long as you use the A parameter. ArchiCAD automatically adjusts the overall part based on A and B values and assumes that the last place the user clicks is important (not a mistake). If I am wrong, I would love to know how to control this.

You can get the result you want with an active hotspot (the diamond shaped type programed into the GDL).