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

How to stretch this object

Anonymous
Not applicable
I might be having a brain cramp but I can't for the life of me get this panel to stretch in plan. It's a simple Standing seam roof panel that I've scripted and plan to tweak further. The problem is that if I can't get it to stretch in plan then it's going to be a pain to use. I'm pretty much just practicing but any info would be greatly appreciated.

Doug

!2D Script

PEN 2
RECT2 0,0,PANEL_WIDTH,A
LINE2 PANEL_WIDTH-.125",0 ,PANEL_WIDTH-.125",A
HOTSPOT2 0,0
HOTSPOT2 PANEL_WIDTH,0
HOTSPOT2 PANEL_WIDTH,A
HOTSPOT2 0,A
HOTSPOT2 PANEL_WIDTH/2,A

!3D Script

MATERIAL MAT
MULY -1
ROTX 90-PITCH
C=A/COS(PITCH)
PRISM 7, C,
0,0,
PANEL_WIDTH,0,
PANEL_WIDTH,1.25",
PANEL_WIDTH-.125",1.25",
PANEL_WIDTH-.125",.125",
0,.125",
0,0
3 REPLIES 3
Anonymous
Not applicable
Hello Doug,
Your code confuses me. Do you want the panel to stretch
horizontally, vertically, or both ? If so, why do you use "A" as the
Y dimension in the RECT2 command ? I assume that the
panel width (X dimension) is fixed and you want the panel
to stretch vertically and then you would use the "B" dimension
as the last parameter in the RECT2 command and put ordinary
hotspots at 0,0 panel_width,0 panel_width,b and 0,b.
I believe the object will stretch vertically.
Peter Devlin
Anonymous
Not applicable
Hi Peter,

Thanks for the input. I'm not sure why but I've had it stuck in my head that regardless of the direction I'm trying t stretch an object(x or y) in plan, I have to use "A". Maybe because I define the width and the only thing left is the length which in my mind is "A" It seems to be working fine with the script shown below. I've had trouble with other scripts that I couldn't stretch and couldn't figure out why...I think I know now. Thanks again.

Doug

!2D

PEN 2
RECT2 0,0,PANEL_WIDTH,B
LINE2 PANEL_WIDTH-.125",0 ,PANEL_WIDTH-.125",B
HOTSPOT2 0,0
HOTSPOT2 PANEL_WIDTH,0
HOTSPOT2 PANEL_WIDTH,B
HOTSPOT2 0,B
HOTSPOT2 PANEL_WIDTH/2,B

!3D

MATERIAL MAT
MULY -1
ROTX 90-PITCH
C=B/COS(PITCH)
PRISM 7, C,
0,0,
PANEL_WIDTH,0,
PANEL_WIDTH,1.25",
PANEL_WIDTH-.125",1.25",
PANEL_WIDTH-.125",.125",
0,.125",
0,0
Anonymous
Not applicable
Hello Doug,
Glad you got it working.
There is something I would like to suggest.
Just to check if your 2D script and your 3D script
size and place the object exactly the same, I routinely
put a PROJECT2 command at the beginning of the 2D script
and if everything looks correct I comment out the command.
You probably already do this but if not it is useful.
Peter Devlin