BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

parametric chair difficulties

Anonymous
Not applicable
Following the 'Intro to object making" guide I have reached to a point with my gdl object where I can't understand the mistake I made, which causes a error message concerning line 31, at the master script check.
I need some help here.All I did was to follow,step-by-step,the exact instructions of the guide.

here is the master script


!Pop down Menu
bv0="No leg braces"
bv1="O brace"
bv2="H brace"
VALUES "bracetype", bv0, bv1, bv2
IF bracetype=bv0 THEN
brace=0
ELSE
brace=1
ENDIF
MATERIAL lmat

IF bakon=0 THEN arms=0

IF bakon=0 THEN strot=0



!Menu for Chair
cv0='Customised chair'
cv1='Foot stool'
cv2='Nursery chair'
cv3='Piano stool'
cv4='Dining chair'
cv5='Dining armchair'
cv6='Kitchen stool'
cv7='Bar stool'
VALUES 'chairtype', cv0,cv1,cv2,cv3,cv4,cv5,cv6,cv7

IF chairtype<>cv0 THEN
!Grey out custom parameters
LOCK 'stlgth','stwidth','stheight'
LOCK 'lsec','backsec'
LOCK 'bakon','bracetype','backheight','arms'
ENDIF


IF chairtype =cv1 THEN !Footstool
stlgth=0.35: stwidth=0.30: stheight=0.28:
lsec=0.04: backsec=0.04: arms=0
bakon=0: bracetype=bv0
ENDIF

IF chairtype =cv2 THEN !Nursery chair
stlgth=0.30: stwidth=0.35: stheight=0.32:
lsec=0.04: frsec=0.04: arms=0
bakon=1: bracetype=bv0: bheight=0.5
ENDIF

IF chairtype =cv3 THEN !Piano stool
stlgth=0.45: stwidth=0.40: stheight=0.45:
lsec=0.05: backsec=0.1: arms=0
bakon=0: bracetype=bv0
ENDIF

IF chairtype =cv4 THEN !Dining chair
stlgth=0.45: stwidth=0.40: stheight=0.45:
lsec=0.05: backsec=0.05: arms=0
bakon=1: bracetype=bv1: backheight=0.55
ENDIF

IF chairtype =cv5 THEN !Dining armchair
stlgth=0.50: stwidth=0.45: stheight=0.45:
lsec=0.05: backsec=0.05: arms=1
bakon=1: bracetype=bv1: backheight=0.65
ENDIF

IF chairtype =cv6 THEN !Kitchen stool
stlgth=0.35: stwidth=0.40: stheight=0.60:
lsec=0.05: backsec=0.05: arms=0
bakon=0: bracetype=bv2
ENDIF

IF chairtyp =cv7 THEN !Bar stool
stlgth=0.35: stwidth=0.40: stheight=0.65:
lsec=0.05: backsec=0.05: arms=0
bakon=1: bracetype=bv2: backheight=0.3
ENDIF


and here is the 3D script



PEN 1
RESOL 12
!All the legs
MATERIAL lmat

!lsec/3 is the down leg diameter
CONE lgheight, lsec/3, lsec/2, 90,90
ADDx stlgth
CONE lgheight, lsec/3, lsec/2, 90,90
ADDy stwidth
CONE lgheight, lsec/3, lsec/2, 90,90
ADDx -stlgth
CONE lgheight, lsec/3, lsec/2, 90,90
DEL 3

!seat and upholstery

ADDz stheight
ROTx -3
BLOCK stlgth,stwidth,stthick
MATERIAL stmat
ADD 0.025,0.025,0.045
BLOCK stmatlth,stmatwdth,stmatthick
DEL 3

!Back Legs, panel and upholstery

IF bakon THEN
MATERIAL framat
ADD 0,stwidth,stheight + stthick + stmatthick
CONE backheight - 0.1,0.03,0.02, 90,90 !leg
ADDx stlgth
CONE backheight - 0.1,0.03,0.02, 90,90 !leg
DEL 2
ADD 0,stwidth-0.02,backheight !back panel
ROTx -2
BLOCK 0.45,backsec,0.35
MATERIAL backmat
ADD 0.05,-0.01,0.02 !back material
BLOCK 0.35,0.01,0.30
DEL 3
ENDIF

MATERIAL lmat
!Braces front to rear
IF bracetype=bv2 THEN !H Brace
ADDz lgheight/3
ADDx lsec/8
ROTx -90
CONE 0.5/2,lsec/4,lsec/3,90,90
ADDz 0.5/2
CONE 0.5/2,lsec/3,lsec/4,90,90
DEL 4
ADD stlgth,lsec/8,lgheight/3
ROTx -90
CONE lgheight/2,lsec/4,lsec/3,90,90
ADDz lgheight/2
CONE lgheight/2,lsec/3,lsec/4,90,90
DEL 3
ADD 0,0.25,lgheight/3
ROTz -90
ROTx -90
CONE stlgth/2,lsec/4,lsec/3,90,90
ADDz stlgth/2
CONE stlgth/2,lsec/3,lsec/4,90,90
DEL 4
ENDIF !brace=bv2

IF bracetype=bv1 THEN !O Brace
ADD 0,0,stheight/3
ROTz -90
ROTx -90
CONE stlgth/2,lsec/4,lsec/3,90,90
ADDz stlgth/2
CONE stlgth/2,lsec/3,lsec/4,90,90
DEL 4
ADD 0,stwidth,stheight/3
ROTz -90
ROTx -90
CONE stlgth/2,lsec/4,lsec/3,90,90
ADDz stlgth/2
CONE stlgth/2,lsec/3,lsec/4,90,90
DEL 4
ADDZ stheight/3
ROTX -90
CONE stwidth/2,lsec/4,lsec/3,90,90
ADDz stwidth/2
CONE stwidth/2,lsec/3,lsec/4,90,90
DEL 3
ADDx stlgth
ADDz stheight/3
ROTx -90
CONE stwidth/2,lsec/4,lsec/3,90,90
ADDz stwidth/2
CONE stwidth/2,lsec/3,lsec/4,90,90
DEL 4
ENDIF


!arms option
IF arms THEN
ADDz backheight !left
ADDy -backheight/6
ROTx -90
MULy 0.5 !Squash the arm cone to an ellipse
CONE stwidth + (backheight/6),lsec/2,lsec/3,90,90
DEL 4
ADDz stheight + stthick + stmatthick
CONE (backheight/3) - 0.06 , lsec/2 , lsec/3 , 90 , 90
DEL 1
ADDx stlgth
ADDz backheight !right
ADDy -backheight/6
ROTx -90
MULy 0.5 !Squash the arm cone to an ellipse
CONE stwidth + (backheight/6),lsec/2,lsec/3,90,90
DEL 5
ADDx stlgth
ADDz stheight + stthick + stmatthick
CONE (backheight/3) - 0.06 , lsec/2 , lsec/3 , 90 , 90
DEL 2
ENDIF
10 REPLIES 10
Anonymous
Not applicable
Yes it works!
It doesn't look correct,i have to make some more adjustments on the script, however the last switch case finally works.
Hurray!!
Learn and get certified!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!