We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Stretchy object in section

Anonymous
Not applicable
Hi all. I was wondering if anyone knew how to script an object that can be stretched horizontally and vertically in section similar to the way complex profiles do. I have a script that was posted by someone a while ago (see below) that has a stretchy hotspot with text attatched to it for 2d but can't figure out how to do it in 3D with a solid object. Just a simple stretchable block would be fine.

Thanks,
Doug

unID=1

!_________________________moving it horizontally
hotspot2 0,verti,unID,horz,1+128 : unID=unID+1
hotspot2 -1,verti,unID,horz,3 : unID=unID+1
hotspot2 horz,verti,unID,horz,2+256 : unID=unID+1

!_________________________moving it vertically
hotspot2 horz,0,unID,verti,1+128 : unID=unID+1
hotspot2 horz,-1,unID,verti,3 : unID=unID+1
hotspot2 horz,verti,unID,verti,2+256 : unID=unID+1

define style 'identify' arial, x_B ,2 ,0
set style 'identify'

text2 horz,verti,"Your Text Here"
2 REPLIES 2
This edits the basic length and height params; no reason you couldn't change them to custom params:

hsid=1
!! Height edit<<<<<<<<<<<<<<<<<<<<<<<<<<<
HOTSPOT A, 0, 0, hsid, ZZYZX, 1+128 : hsid=hsid+1 !b
HOTSPOT A, 0, ZZYZX, hsid, ZZYZX, 2 : hsid=hsid+1 !m
HOTSPOT A, 0, -1, hsid, ZZYZX, 3 : hsid=hsid+1 !r

!! Length edit<<<<<<<<<<<<<<<<<<<<<<<<<<<
HOTSPOT 0, 0, ZZYZX, hsid, A, 1+128 : hsid=hsid+1 !b
HOTSPOT A, 0, ZZYZX, hsid, A, 2 : hsid=hsid+1 !m
HOTSPOT -1, 0, ZZYZX, hsid, A, 3 : hsid=hsid+1 !r
This works reliably for me in 3D. Graphical editing in section is still buggy IMO, but when it works it works.

Of course this is in the 3D script, which means that TEXT2 isn't going to do anything. And they need to be HOTSPOTs, no '2'. Three params (X, Y, Z) before the ID.

This is the way to offer stretchy height for objects in section. It makes you wonder why plain vertical stretching can't just work.

Tip: Put a space after a comma, it makes the code easier to read. Another: Do a find/replace of ',' with ', '.
James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info
Anonymous
Not applicable
This is the way to offer stretchy height for objects in section. It makes you wonder why plain vertical stretching can't just work.
I agree James. I had a feeling that the same type of script would do the same thing in 3D as the 2D I posted(with modifications). I'm not claiming to fully understand how it works but I'm glad it does. Now I've got to try to put it to use. Thank you very much for your input.

Doug