This is a simple object representing straight metal chain with editable size, lenght, material and pencolor. I needed this to model certain objects with chains and I was surprised that such a common object was not found in all my libraries. Here is the code and the object itself created for ArchiCAD 12:
Parameters
Here is a screen with the parameters needed for the object:
Master Script
A little master script for the extra inclined lenght parameter:
Let Ra=0.5*Thlet LL=Le*sin(ro) 2D Script
project2 3, 270, 2 hsid=111hsid=hsid+1Hotspot2 0, 0, hsid, LE, 1 !+128hsid=hsid+1Hotspot2 0, -LL, hsid, LE, 2hsid=hsid+1Hotspot2 0, 1, hsid, LE, 3 3D script
Finally the most important:
pen pen1
material ma
hsid=22
hsid=hsid+1
Hotspot 0, 0, 1, hsid, ro, 4+128
rotx ro
hsid=hsid+1
Hotspot 0, 0, 1, hsid, ro, 5
del 1
hsid=hsid+1
Hotspot 0, 0, 0, hsid, ro, 6
hsid=hsid+1
Hotspot 1, 0, 0, hsid, ro, 7
rotx ro
hsid=1
hsid=hsid+1
Hotspot 0, 0, 0, hsid, Le, 1 !+128
hsid=hsid+1
Hotspot 0, 0, LE, hsid, Le, 2
hsid=hsid+1
Hotspot 0, 0, -1, hsid, Le, 3
for k=0 to Le step 4*Rb-2*Ra
resol rr
cylind 2*Rb, Ra
addx 2*Rb
cylind 2*Rb, Ra
roty 180
elbow Rb, 180, Ra
addz -2*Rb
rotx 180
elbow Rb, 180, Ra
del 4
addx Rb
addz 4*Rb-2*Ra
rotz 90
addx -Rb
next k