<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: parametric chair difficulties in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164360#M22049</link>
    <description>the image</description>
    <pubDate>Wed, 06 Jan 2010 12:49:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-01-06T12:49:50Z</dc:date>
    <item>
      <title>parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164353#M22042</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;&lt;FONT color="#6dff00"&gt;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.&lt;BR /&gt;
I need some help here.All I did was to follow,step-by-step,the exact instructions of the guide.&lt;BR /&gt;
&lt;BR /&gt;
here is the master script&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
!Pop down Menu&lt;BR /&gt;
bv0="No leg braces"&lt;BR /&gt;
bv1="O brace"&lt;BR /&gt;
bv2="H brace"&lt;BR /&gt;
VALUES "bracetype", bv0, bv1, bv2&lt;BR /&gt;
IF bracetype=bv0 THEN&lt;BR /&gt;
brace=0&lt;BR /&gt;
ELSE&lt;BR /&gt;
brace=1&lt;BR /&gt;
ENDIF&lt;BR /&gt;
MATERIAL lmat&lt;BR /&gt;
&lt;BR /&gt;
IF bakon=0 THEN arms=0&lt;BR /&gt;
&lt;BR /&gt;
IF bakon=0 THEN strot=0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
!Menu for Chair&lt;BR /&gt;
cv0='Customised chair'&lt;BR /&gt;
cv1='Foot stool'&lt;BR /&gt;
cv2='Nursery chair'&lt;BR /&gt;
cv3='Piano stool'&lt;BR /&gt;
cv4='Dining chair'&lt;BR /&gt;
cv5='Dining armchair'&lt;BR /&gt;
cv6='Kitchen stool'&lt;BR /&gt;
cv7='Bar stool'&lt;BR /&gt;
VALUES 'chairtype', cv0,cv1,cv2,cv3,cv4,cv5,cv6,cv7&lt;BR /&gt;
&lt;BR /&gt;
IF chairtype&amp;lt;&amp;gt;cv0 THEN&lt;BR /&gt;
!Grey out custom parameters&lt;BR /&gt;
LOCK 'stlgth','stwidth','stheight'&lt;BR /&gt;
LOCK 'lsec','backsec'&lt;BR /&gt;
LOCK 'bakon','bracetype','backheight','arms'&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
IF chairtype =cv1 THEN !Footstool&lt;BR /&gt;
stlgth=0.35: stwidth=0.30: stheight=0.28:&lt;BR /&gt;
lsec=0.04: backsec=0.04: arms=0&lt;BR /&gt;
bakon=0: bracetype=bv0&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF chairtype =cv2 THEN !Nursery chair&lt;BR /&gt;
stlgth=0.30: stwidth=0.35: stheight=0.32:&lt;BR /&gt;
lsec=0.04: frsec=0.04: arms=0&lt;BR /&gt;
bakon=1: bracetype=bv0: bheight=0.5&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF chairtype =cv3 THEN !Piano stool&lt;BR /&gt;
stlgth=0.45: stwidth=0.40: stheight=0.45:&lt;BR /&gt;
lsec=0.05: backsec=0.1: arms=0&lt;BR /&gt;
bakon=0: bracetype=bv0&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF chairtype =cv4 THEN !Dining chair&lt;BR /&gt;
stlgth=0.45: stwidth=0.40: stheight=0.45:&lt;BR /&gt;
lsec=0.05: backsec=0.05: arms=0&lt;BR /&gt;
bakon=1: bracetype=bv1: backheight=0.55&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF chairtype =cv5 THEN !Dining armchair&lt;BR /&gt;
stlgth=0.50: stwidth=0.45: stheight=0.45:&lt;BR /&gt;
lsec=0.05: backsec=0.05: arms=1&lt;BR /&gt;
bakon=1: bracetype=bv1: backheight=0.65&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF chairtype =cv6 THEN !Kitchen stool&lt;BR /&gt;
stlgth=0.35: stwidth=0.40: stheight=0.60:&lt;BR /&gt;
lsec=0.05: backsec=0.05: arms=0&lt;BR /&gt;
bakon=0: bracetype=bv2&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF chairtyp =cv7 THEN !Bar stool&lt;BR /&gt;
stlgth=0.35: stwidth=0.40: stheight=0.65:&lt;BR /&gt;
lsec=0.05: backsec=0.05: arms=0&lt;BR /&gt;
bakon=1: bracetype=bv2: backheight=0.3&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#00ff64"&gt;&lt;BR /&gt;
and here is the 3D script&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PEN 1&lt;BR /&gt;
RESOL 12&lt;BR /&gt;
!All the legs&lt;BR /&gt;
MATERIAL lmat&lt;BR /&gt;
&lt;BR /&gt;
!lsec/3 is the down leg diameter&lt;BR /&gt;
CONE  lgheight, lsec/3, lsec/2, 90,90&lt;BR /&gt;
ADDx  stlgth&lt;BR /&gt;
CONE  lgheight, lsec/3, lsec/2, 90,90&lt;BR /&gt;
ADDy  stwidth&lt;BR /&gt;
CONE  lgheight, lsec/3, lsec/2, 90,90&lt;BR /&gt;
ADDx  -stlgth&lt;BR /&gt;
CONE  lgheight, lsec/3, lsec/2, 90,90&lt;BR /&gt;
DEL  3&lt;BR /&gt;
&lt;BR /&gt;
!seat and upholstery&lt;BR /&gt;
&lt;BR /&gt;
ADDz  stheight&lt;BR /&gt;
ROTx  -3&lt;BR /&gt;
BLOCK  stlgth,stwidth,stthick&lt;BR /&gt;
MATERIAL  stmat&lt;BR /&gt;
ADD  0.025,0.025,0.045&lt;BR /&gt;
BLOCK  stmatlth,stmatwdth,stmatthick&lt;BR /&gt;
DEL  3&lt;BR /&gt;
&lt;BR /&gt;
!Back Legs, panel and upholstery&lt;BR /&gt;
&lt;BR /&gt;
IF bakon THEN&lt;BR /&gt;
 MATERIAL  framat&lt;BR /&gt;
 ADD  0,stwidth,stheight + stthick + stmatthick&lt;BR /&gt;
 CONE  backheight - 0.1,0.03,0.02, 90,90  !leg&lt;BR /&gt;
 ADDx  stlgth&lt;BR /&gt;
 CONE  backheight - 0.1,0.03,0.02, 90,90  !leg&lt;BR /&gt;
 DEL  2&lt;BR /&gt;
 ADD  0,stwidth-0.02,backheight         !back panel&lt;BR /&gt;
 ROTx  -2&lt;BR /&gt;
 BLOCK  0.45,backsec,0.35&lt;BR /&gt;
 MATERIAL  backmat&lt;BR /&gt;
 ADD  0.05,-0.01,0.02       !back material&lt;BR /&gt;
 BLOCK  0.35,0.01,0.30&lt;BR /&gt;
 DEL  3&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
MATERIAL  lmat&lt;BR /&gt;
!Braces front to rear&lt;BR /&gt;
IF  bracetype=bv2  THEN     !H Brace&lt;BR /&gt;
 ADDz  lgheight/3&lt;BR /&gt;
 ADDx  lsec/8&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 CONE  0.5/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  0.5/2&lt;BR /&gt;
 CONE  0.5/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  4&lt;BR /&gt;
 ADD  stlgth,lsec/8,lgheight/3&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 CONE  lgheight/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  lgheight/2&lt;BR /&gt;
 CONE  lgheight/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  3&lt;BR /&gt;
 ADD  0,0.25,lgheight/3&lt;BR /&gt;
 ROTz  -90&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 CONE  stlgth/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  stlgth/2&lt;BR /&gt;
 CONE  stlgth/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  4&lt;BR /&gt;
ENDIF  !brace=bv2&lt;BR /&gt;
&lt;BR /&gt;
IF  bracetype=bv1  THEN    !O Brace&lt;BR /&gt;
 ADD  0,0,stheight/3&lt;BR /&gt;
 ROTz  -90&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 CONE  stlgth/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  stlgth/2&lt;BR /&gt;
 CONE  stlgth/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  4&lt;BR /&gt;
 ADD  0,stwidth,stheight/3&lt;BR /&gt;
 ROTz  -90&lt;BR /&gt;
 ROTx  -90 &lt;BR /&gt;
 CONE  stlgth/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  stlgth/2&lt;BR /&gt;
 CONE  stlgth/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL 4&lt;BR /&gt;
 ADDZ  stheight/3&lt;BR /&gt;
 ROTX  -90&lt;BR /&gt;
 CONE stwidth/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  stwidth/2&lt;BR /&gt;
 CONE  stwidth/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  3&lt;BR /&gt;
 ADDx  stlgth&lt;BR /&gt;
 ADDz  stheight/3&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 CONE  stwidth/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  stwidth/2&lt;BR /&gt;
 CONE  stwidth/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  4&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
!arms option&lt;BR /&gt;
IF  arms  THEN&lt;BR /&gt;
 ADDz  backheight  !left&lt;BR /&gt;
 ADDy  -backheight/6&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 MULy 0.5 !Squash the arm cone to an ellipse&lt;BR /&gt;
 CONE stwidth + (backheight/6),lsec/2,lsec/3,90,90&lt;BR /&gt;
 DEL  4&lt;BR /&gt;
 ADDz  stheight + stthick + stmatthick&lt;BR /&gt;
 CONE  (backheight/3) - 0.06 , lsec/2 , lsec/3 , 90 , 90&lt;BR /&gt;
 DEL  1&lt;BR /&gt;
 ADDx  stlgth&lt;BR /&gt;
 ADDz  backheight !right&lt;BR /&gt;
 ADDy  -backheight/6&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 MULy 0.5 !Squash the arm cone to an ellipse&lt;BR /&gt;
 CONE stwidth + (backheight/6),lsec/2,lsec/3,90,90&lt;BR /&gt;
 DEL 5&lt;BR /&gt;
 ADDx  stlgth&lt;BR /&gt;
 ADDz  stheight + stthick + stmatthick&lt;BR /&gt;
 CONE  (backheight/3) - 0.06 , lsec/2 , lsec/3 , 90 , 90&lt;BR /&gt;
 DEL  2&lt;BR /&gt;
ENDIF&lt;/R&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/74990iA3C7F648C5C6A556/image-size/large?v=v2&amp;amp;px=999" border="0" alt="parametric_chair.jpg" title="parametric_chair.jpg" /&gt;</description>
      <pubDate>Mon, 04 Jan 2010 13:43:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164353#M22042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-04T13:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164354#M22043</link>
      <description>Seems to work OK for me. Have you added "chairtype" to the list of parameters? I only get an error if this parameter doesn't exist.&lt;BR /&gt;
&lt;BR /&gt;
I also noticed you have mis-spelled chairtyp =cv7 in the Masterscript. Should be chairtype =cv7.&lt;BR /&gt;
&lt;BR /&gt;
Hope that sorts it!</description>
      <pubDate>Mon, 04 Jan 2010 18:26:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164354#M22043</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-04T18:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164355#M22044</link>
      <description>thank you for your time,however the problem was the double braces i did't use around "chairtype". it should be &lt;BR /&gt;
&lt;BR /&gt;
if "chairtype"&amp;lt;&amp;gt;cv0...&lt;BR /&gt;
if "chairtype"=cv1...&lt;BR /&gt;
..and so on..&lt;BR /&gt;
&lt;BR /&gt;
now the problem is that the 3d view of my object does not react to any change of the value of "chairtype"...&lt;BR /&gt;
&lt;BR /&gt;
i am wondering,does some part of the script need to be written inside the 3d script and some other part inside the master script? is that my mistake?</description>
      <pubDate>Mon, 04 Jan 2010 22:48:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164355#M22044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-04T22:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164356#M22045</link>
      <description>deinan,&lt;BR /&gt;
&lt;BR /&gt;
where you have part of the script like this&lt;BR /&gt;
&lt;BR /&gt;
IF chairtype =cv1 THEN !Footstool &lt;BR /&gt;
stlgth=0.35: stwidth=0.30: stheight=0.28: &lt;BR /&gt;
lsec=0.04: backsec=0.04: arms=0 &lt;BR /&gt;
bakon=0: bracetype=bv0 &lt;BR /&gt;
ENDIF &lt;BR /&gt;
&lt;BR /&gt;
are all these parameters? if so you will need to change the script to read like this&lt;BR /&gt;
&lt;BR /&gt;
IF chairtype =cv1 THEN !Footstool &lt;BR /&gt;
parameters stlgth=0.35, stwidth=0.30, stheight=0.28, &lt;BR /&gt;
lsec=0.04, backsec=0.04, arms=0, &lt;BR /&gt;
bakon=0, bracetype=bv0&lt;BR /&gt;
ENDIF &lt;BR /&gt;
&lt;BR /&gt;
This applies to every other parameter you are trying to change its value in the Parameter or Master Script tabs. If it is a variable however, it does not need to use the parameter command.&lt;BR /&gt;
&lt;BR /&gt;
Hope that helps...</description>
      <pubDate>Tue, 05 Jan 2010 00:33:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164356#M22045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-05T00:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164357#M22046</link>
      <description>some of them are variables while some others are parametres.I corrected the script where parameters were involved.still it doesn't work, plus there is an error message,saying that i am using non-necessary symbols at certain places.i couldn't find any of those symbols.&lt;BR /&gt;
&lt;BR /&gt;
here is an example&lt;BR /&gt;
&lt;BR /&gt;
IF "chairtype" =cv1 THEN !Footstool&lt;BR /&gt;
stlgth=0.35, stwidth=0.30, stheight=0.28&lt;BR /&gt;
lsec=0.04, backsec=0.04&lt;BR /&gt;
PARAMETERS arms=0, bakon=0, bracetype=bv0&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
the error message indicates the second line&lt;BR /&gt;
&lt;BR /&gt;
stlgth=0.35, stwidth=0.30, stheight=0.28&lt;BR /&gt;
&lt;BR /&gt;
any ideas?</description>
      <pubDate>Tue, 05 Jan 2010 19:35:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164357#M22046</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-05T19:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164358#M22047</link>
      <description>Where you dont use the PARAMETERS command you can use your original script. So replace your , with : as below.&lt;BR /&gt;
&lt;BR /&gt;
IF "chairtype" =cv1 THEN !Footstool&lt;BR /&gt;
stlgth=0.35: stwidth=0.30: stheight=0.28&lt;BR /&gt;
lsec=0.04: backsec=0.04&lt;BR /&gt;
PARAMETERS arms=0, bakon=0, bracetype=bv0&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
It may be a personal preference but i would actually write the script like this, much easier to read once you have to find it and read it quickly amoungst hundreds of lines of script.&lt;BR /&gt;
&lt;BR /&gt;
   !Footstool&lt;BR /&gt;
if "chairtype" =cv1 then&lt;BR /&gt;
&lt;BR /&gt;
   stlgth=0.35&lt;BR /&gt;
   stwidth=0.30&lt;BR /&gt;
   stheight=0.28&lt;BR /&gt;
   lsec=0.04&lt;BR /&gt;
   backsec=0.04&lt;BR /&gt;
   parameters arms=0,&lt;BR /&gt;
      bakon=0,&lt;BR /&gt;
      bracetype=bv0&lt;BR /&gt;
&lt;BR /&gt;
endif</description>
      <pubDate>Tue, 05 Jan 2010 21:48:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164358#M22047</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-05T21:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164359#M22048</link>
      <description>Thank you,i corrected the symbols,there is no error message now.Still my model doesn't respond though..  I am sending again the current scripts and an image of my variables and parametres,maybe you can help me find the mistake i am making as a newbie..&lt;BR /&gt;
&lt;BR /&gt;
3d script&lt;BR /&gt;
&lt;BR /&gt;
PEN 1&lt;BR /&gt;
RESOL 12&lt;BR /&gt;
&lt;BR /&gt;
!All the legs&lt;BR /&gt;
&lt;BR /&gt;
MATERIAL lmat&lt;BR /&gt;
!lsec/3 is the down leg diameter&lt;BR /&gt;
CONE  lgheight, lsec/3, lsec/2, 90,90&lt;BR /&gt;
ADDx  stlgth&lt;BR /&gt;
CONE  lgheight, lsec/3, lsec/2, 90,90&lt;BR /&gt;
ADDy  stwidth&lt;BR /&gt;
CONE  lgheight, lsec/3, lsec/2, 90,90&lt;BR /&gt;
ADDx  -stlgth&lt;BR /&gt;
CONE  lgheight, lsec/3, lsec/2, 90,90&lt;BR /&gt;
DEL  3&lt;BR /&gt;
&lt;BR /&gt;
!seat and upholstery&lt;BR /&gt;
&lt;BR /&gt;
ADDz  stheight&lt;BR /&gt;
ROTx  -3&lt;BR /&gt;
BLOCK  stlgth,stwidth,stthick&lt;BR /&gt;
MATERIAL  stmat&lt;BR /&gt;
ADD  0.025,0.025,0.045&lt;BR /&gt;
BLOCK  stmatlth,stmatwdth,stmatthick&lt;BR /&gt;
DEL  3&lt;BR /&gt;
&lt;BR /&gt;
!Back Legs, panel and upholstery&lt;BR /&gt;
&lt;BR /&gt;
IF bakon THEN&lt;BR /&gt;
 MATERIAL  framat&lt;BR /&gt;
 ADD  0,stwidth,stheight + stthick + stmatthick&lt;BR /&gt;
 CONE  backheight - 0.1,0.03,0.02, 90,90  !leg&lt;BR /&gt;
 ADDx  stlgth&lt;BR /&gt;
 CONE  backheight - 0.1,0.03,0.02, 90,90  !leg&lt;BR /&gt;
 DEL  2&lt;BR /&gt;
 ADD  0,stwidth-0.02,backheight         !back panel&lt;BR /&gt;
 ROTx  -2&lt;BR /&gt;
 BLOCK  backlgth,backsec,backlgth-10&lt;BR /&gt;
 MATERIAL  backmat&lt;BR /&gt;
 ADD  0.05,-0.01,0.02       !back material&lt;BR /&gt;
 BLOCK  0.35,0.01,0.30&lt;BR /&gt;
 DEL  3&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
MATERIAL  lmat&lt;BR /&gt;
!Braces front to rear&lt;BR /&gt;
IF  bracetype=bv2  THEN     !H Brace&lt;BR /&gt;
 ADDz  lgheight/3&lt;BR /&gt;
 ADDx  lsec/8&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 CONE  0.5/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  0.5/2&lt;BR /&gt;
 CONE  0.5/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  4&lt;BR /&gt;
 ADD  stlgth,lsec/8,lgheight/3&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 CONE  lgheight/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  lgheight/2&lt;BR /&gt;
 CONE  lgheight/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  3&lt;BR /&gt;
 ADD  0,0.25,lgheight/3&lt;BR /&gt;
 ROTz  -90&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 CONE  stlgth/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  stlgth/2&lt;BR /&gt;
 CONE  stlgth/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  4&lt;BR /&gt;
ENDIF  !brace=bv2&lt;BR /&gt;
&lt;BR /&gt;
IF  bracetype=bv1  THEN    !O Brace&lt;BR /&gt;
 ADD  0,0,stheight/3&lt;BR /&gt;
 ROTz  -90&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 CONE  stlgth/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  stlgth/2&lt;BR /&gt;
 CONE  stlgth/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  4&lt;BR /&gt;
 ADD  0,stwidth,stheight/3&lt;BR /&gt;
 ROTz  -90&lt;BR /&gt;
 ROTx  -90 &lt;BR /&gt;
 CONE  stlgth/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  stlgth/2&lt;BR /&gt;
 CONE  stlgth/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL 4&lt;BR /&gt;
 ADDZ  stheight/3&lt;BR /&gt;
 ROTX  -90&lt;BR /&gt;
 CONE stwidth/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  stwidth/2&lt;BR /&gt;
 CONE  stwidth/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  3&lt;BR /&gt;
 ADDx  stlgth&lt;BR /&gt;
 ADDz  stheight/3&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 CONE  stwidth/2,lsec/4,lsec/3,90,90&lt;BR /&gt;
 ADDz  stwidth/2&lt;BR /&gt;
 CONE  stwidth/2,lsec/3,lsec/4,90,90&lt;BR /&gt;
 DEL  4&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
!arms option&lt;BR /&gt;
IF  arms  THEN&lt;BR /&gt;
 ADDz  backheight  !left&lt;BR /&gt;
 ADDy  -backheight/6&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 MULy 0.5 !Squash the arm cone to an ellipse&lt;BR /&gt;
 CONE stwidth + (backheight/6),lsec/2,lsec/3,90,90&lt;BR /&gt;
 DEL  4&lt;BR /&gt;
 ADDz  stheight + stthick + stmatthick&lt;BR /&gt;
 CONE  (backheight/3) - 0.06 , lsec/2 , lsec/3 , 90 , 90&lt;BR /&gt;
 DEL  1&lt;BR /&gt;
 ADDx  stlgth&lt;BR /&gt;
 ADDz  backheight !right&lt;BR /&gt;
 ADDy  -backheight/6&lt;BR /&gt;
 ROTx  -90&lt;BR /&gt;
 MULy 0.5 !Squash the arm cone to an ellipse&lt;BR /&gt;
 CONE stwidth + (backheight/6),lsec/2,lsec/3,90,90&lt;BR /&gt;
 DEL 5&lt;BR /&gt;
 ADDx  stlgth&lt;BR /&gt;
 ADDz  stheight + stthick + stmatthick&lt;BR /&gt;
 CONE  (backheight/3) - 0.06 , lsec/2 , lsec/3 , 90 , 90&lt;BR /&gt;
 DEL  2&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
master script&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
!Pop down Menu&lt;BR /&gt;
bv0="No leg braces"&lt;BR /&gt;
bv1="O brace"&lt;BR /&gt;
bv2="H brace"&lt;BR /&gt;
VALUES "bracetype", bv0, bv1, bv2&lt;BR /&gt;
IF bracetype=bv0 THEN&lt;BR /&gt;
brace=0&lt;BR /&gt;
ELSE&lt;BR /&gt;
brace=1&lt;BR /&gt;
ENDIF&lt;BR /&gt;
MATERIAL lmat&lt;BR /&gt;
&lt;BR /&gt;
IF bracetype=bv0 THEN&lt;BR /&gt;
brace=0&lt;BR /&gt;
ELSE&lt;BR /&gt;
brace=1&lt;BR /&gt;
ENDIF&lt;BR /&gt;
MATERIAL lmat&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
IF bakon=0 THEN arms=0: strot=0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
!Menu for Chair&lt;BR /&gt;
cv0="Customised chair"&lt;BR /&gt;
cv1="Foot stool"&lt;BR /&gt;
cv2="Nursery chair"&lt;BR /&gt;
cv3="Piano stool"&lt;BR /&gt;
cv4="Dining chair"&lt;BR /&gt;
cv5="Dining armchair"&lt;BR /&gt;
cv6="Kitchen stool"&lt;BR /&gt;
cv7="Bar stool"&lt;BR /&gt;
VALUES "chairtype" ,cv0,cv1,cv2,cv3,cv4,cv5,cv6,cv7&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
!Customized chair&lt;BR /&gt;
IF "chairtype"&amp;lt;&amp;gt;cv0 THEN  &lt;BR /&gt;
!Grey out custom parameters&lt;BR /&gt;
LOCK 'stlgth',&lt;BR /&gt;
'stwidth',&lt;BR /&gt;
'stheight',&lt;BR /&gt;
'lsec',&lt;BR /&gt;
'backsec' ,&lt;BR /&gt;
'bakon',&lt;BR /&gt;
'bracetype',&lt;BR /&gt;
'backheight',&lt;BR /&gt;
'arms'&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
!Footstool&lt;BR /&gt;
IF "chairtype" =cv1 THEN &lt;BR /&gt;
stlgth=0.35 &lt;BR /&gt;
stwidth=0.30 &lt;BR /&gt;
stheight=0.28&lt;BR /&gt;
lsec=0.04&lt;BR /&gt;
backsec=0.04&lt;BR /&gt;
PARAMETERS arms=0, bakon=0, bracetype=bv0&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
!Nursery chair&lt;BR /&gt;
IF "chairtype" =cv2 THEN&lt;BR /&gt;
stlgth=0.30 &lt;BR /&gt;
stwidth=0.35 &lt;BR /&gt;
stheight=0.32&lt;BR /&gt;
lsec=0.04 &lt;BR /&gt;
frsec=0.04 &lt;BR /&gt;
bheight=0.5&lt;BR /&gt;
PARAMETERS arms=0, bakon=1, bracetype=bv0&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
!Piano stool&lt;BR /&gt;
IF "chairtype" =cv3 THEN &lt;BR /&gt;
stlgth=0.45 &lt;BR /&gt;
stwidth=0.40 &lt;BR /&gt;
stheight=0.45&lt;BR /&gt;
lsec=0.05 &lt;BR /&gt;
backsec=0.1&lt;BR /&gt;
PARAMETERS arms=0, bakon=0, bracetype=bv0&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
!Dining chair&lt;BR /&gt;
IF "chairtype" =cv4 THEN &lt;BR /&gt;
stlgth=0.45&lt;BR /&gt;
stwidth=0.40 &lt;BR /&gt;
stheight=0.45&lt;BR /&gt;
lsec=0.05&lt;BR /&gt;
backsec=0.05 &lt;BR /&gt;
backheight=0.55&lt;BR /&gt;
PARAMETERS bakon=1, bracetype=bv1, arms=0&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
!Dining armchair&lt;BR /&gt;
IF "chairtype" =cv5 THEN &lt;BR /&gt;
stlgth=0.50 &lt;BR /&gt;
stwidth=0.45 &lt;BR /&gt;
stheight=0.45&lt;BR /&gt;
lsec=0.05 &lt;BR /&gt;
backsec=0.05 &lt;BR /&gt;
backheight=0.65&lt;BR /&gt;
PARAMETERS bakon=1, bracetype=bv1, arms=1&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
!Kitchen stool&lt;BR /&gt;
IF "chairtype" =cv6 THEN &lt;BR /&gt;
stlgth=0.35 &lt;BR /&gt;
stwidth=0.40 &lt;BR /&gt;
stheight=0.60&lt;BR /&gt;
lsec=0.05 &lt;BR /&gt;
backsec=0.05&lt;BR /&gt;
PARAMETERS bakon=0, bracetype=bv2, arms=0&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
!Bar stool&lt;BR /&gt;
IF "chairtype" =cv7 THEN !Bar stool&lt;BR /&gt;
stlgth=0.35 &lt;BR /&gt;
stwidth=0.40 &lt;BR /&gt;
stheight=0.65&lt;BR /&gt;
lsec=0.05 &lt;BR /&gt;
backsec=0.05 &lt;BR /&gt;
backheight=0.3&lt;BR /&gt;
PARAMETERS bakon=1, bracetype=bv2, arms=0&lt;BR /&gt;
ENDIF</description>
      <pubDate>Wed, 06 Jan 2010 12:18:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164359#M22048</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-06T12:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164360#M22049</link>
      <description>the image</description>
      <pubDate>Wed, 06 Jan 2010 12:49:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164360#M22049</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-06T12:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164361#M22050</link>
      <description>In trying to run the script there seems to be alot of errors. You can check these by clicking on "check script" at the top of each script. It will tell you the line number where the problem is. I wont try and fix them all but will leave it with you to go through them all.&lt;BR /&gt;
&lt;BR /&gt;
In terms of changing the "chair type" there were a few places where you had the parameters and variable command mixed up. Any changes you want to make to a parameter listed in the object you need to use the PARAMATER command. Any not listed as parameters you dont need it. I have fixed these and rewritten this part so the values of the chair type work correctly&lt;BR /&gt;
&lt;BR /&gt;
IF bakon=0 THEN !!!!!!!!!!!!!!!Need to put on separate lines and missing endif&lt;BR /&gt;
	arms=0&lt;BR /&gt;
	strot=0&lt;BR /&gt;
ENDIF &lt;BR /&gt;
&lt;BR /&gt;
!!Menu for Chair &lt;BR /&gt;
!cv0="Customised chair" &lt;BR /&gt;
!cv1="Foot stool" &lt;BR /&gt;
!cv2="Nursery chair" &lt;BR /&gt;
!cv3="Piano stool" &lt;BR /&gt;
!cv4="Dining chair" &lt;BR /&gt;
!cv5="Dining armchair" &lt;BR /&gt;
!cv6="Kitchen stool" &lt;BR /&gt;
!cv7="Bar stool" &lt;BR /&gt;
!VALUES "chairtype" ,cv0,cv1,cv2,cv3,cv4,cv5,cv6,cv7&lt;BR /&gt;
&lt;BR /&gt;
!Rewrite the above to &lt;BR /&gt;
VALUES "chairtype" "Customised chair",&lt;BR /&gt;
"Foot stool",&lt;BR /&gt;
"Nursery chair",&lt;BR /&gt;
"Piano stool",&lt;BR /&gt;
"Dining chair",&lt;BR /&gt;
"Dining armchair",&lt;BR /&gt;
"Kitchen stool",&lt;BR /&gt;
"Bar stool"&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
if chairtype="Customised chair" then chairtypefinal="cv0"&lt;BR /&gt;
if chairtype="Foot stool" then chairtypefinal="cv1"&lt;BR /&gt;
if chairtype="Nursery chair" then chairtypefinal="cv2"&lt;BR /&gt;
if chairtype="Piano stool" then chairtypefinal="cv3"&lt;BR /&gt;
if chairtype="Dining chair" then chairtypefinal="cv4"&lt;BR /&gt;
if chairtype="Dining armchair" then chairtypefinal="cv5"&lt;BR /&gt;
if chairtype="Kitchen stool" then chairtypefinal="cv6"&lt;BR /&gt;
if chairtype="Bar stool" then chairtypefinal="cv7"&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
!Customized chair &lt;BR /&gt;
IF chairtypefinal &amp;lt;&amp;gt; "cv0" THEN !!!!!!!!!!!!remove brackets and changed variable&lt;BR /&gt;
!Grey out custom parameters &lt;BR /&gt;
LOCK 'stlgth',&lt;BR /&gt;
'stwidth', &lt;BR /&gt;
'stheight', &lt;BR /&gt;
'lsec', &lt;BR /&gt;
'backsec' , &lt;BR /&gt;
'bakon', &lt;BR /&gt;
'bracetype', &lt;BR /&gt;
'backheight', &lt;BR /&gt;
'arms' &lt;BR /&gt;
ENDIF &lt;BR /&gt;
&lt;BR /&gt;
!Footstool &lt;BR /&gt;
IF chairtypefinal = "cv1" THEN  !!!!!!!!!!!!changed&lt;BR /&gt;
PARAMETERS stlgth=0.35, &lt;BR /&gt;
stwidth=0.30, &lt;BR /&gt;
stheight=0.28,&lt;BR /&gt;
lsec=0.04,&lt;BR /&gt;
backsec=0.04, &lt;BR /&gt;
arms=0,&lt;BR /&gt;
bakon=0,&lt;BR /&gt;
bracetype=bv0 &lt;BR /&gt;
ENDIF &lt;BR /&gt;
&lt;BR /&gt;
!Nursery chair &lt;BR /&gt;
IF chairtypefinal ="cv2" THEN  !!!!!!!!!!!!changed&lt;BR /&gt;
PARAMETERS stlgth=0.30, &lt;BR /&gt;
stwidth=0.35, &lt;BR /&gt;
stheight=0.32, &lt;BR /&gt;
lsec=0.04, &lt;BR /&gt;
arms=0,&lt;BR /&gt;
bakon=1,&lt;BR /&gt;
bracetype=bv0&lt;BR /&gt;
&lt;BR /&gt;
bheight=0.5&lt;BR /&gt;
frsec=0.04 &lt;BR /&gt;
ENDIF &lt;BR /&gt;
&lt;BR /&gt;
!Piano stool &lt;BR /&gt;
IF chairtypefinal ="cv3" THEN  !!!!!!!!!!!!changed&lt;BR /&gt;
PARAMETERS stlgth=0.45, &lt;BR /&gt;
stwidth=0.40, &lt;BR /&gt;
stheight=0.45, &lt;BR /&gt;
lsec=0.05 ,&lt;BR /&gt;
backsec=0.1 ,&lt;BR /&gt;
arms=0,&lt;BR /&gt;
bakon=0,&lt;BR /&gt;
bracetype=bv0 &lt;BR /&gt;
ENDIF &lt;BR /&gt;
&lt;BR /&gt;
!Dining chair &lt;BR /&gt;
IF chairtypefinal ="cv4" THEN  !!!!!!!!!!!!changed&lt;BR /&gt;
PARAMETERS stlgth=0.45, &lt;BR /&gt;
stwidth=0.40, &lt;BR /&gt;
stheight=0.45, &lt;BR /&gt;
lsec=0.05, &lt;BR /&gt;
backsec=0.05, &lt;BR /&gt;
backheight=0.55, &lt;BR /&gt;
bakon=1,&lt;BR /&gt;
bracetype=bv1,&lt;BR /&gt;
arms=0 &lt;BR /&gt;
ENDIF &lt;BR /&gt;
&lt;BR /&gt;
!Dining armchair &lt;BR /&gt;
IF chairtypefinal ="cv5" THEN  !!!!!!!!!!!!changed&lt;BR /&gt;
PARAMETERS stlgth=0.50, &lt;BR /&gt;
stwidth=0.45, &lt;BR /&gt;
stheight=0.45, &lt;BR /&gt;
lsec=0.05, &lt;BR /&gt;
backsec=0.05, &lt;BR /&gt;
backheight=0.65, &lt;BR /&gt;
bakon=1,&lt;BR /&gt;
bracetype=bv1,&lt;BR /&gt;
arms=1 &lt;BR /&gt;
ENDIF &lt;BR /&gt;
&lt;BR /&gt;
!Kitchen stool &lt;BR /&gt;
IF chairtypefinal ="cv6" THEN  !!!!!!!!!!!!changed&lt;BR /&gt;
PARAMETERS stlgth=0.35, &lt;BR /&gt;
stwidth=0.40, &lt;BR /&gt;
stheight=0.60, &lt;BR /&gt;
lsec=0.05, &lt;BR /&gt;
backsec=0.05, &lt;BR /&gt;
bakon=0,&lt;BR /&gt;
bracetype=bv2,&lt;BR /&gt;
arms=0 &lt;BR /&gt;
ENDIF &lt;BR /&gt;
&lt;BR /&gt;
!Bar stool &lt;BR /&gt;
IF chairtypefinal ="cv7" THEN !Bar stool  !!!!!!!!!!!!changed&lt;BR /&gt;
PARAMETERS stlgth=0.35, &lt;BR /&gt;
stwidth=0.40, &lt;BR /&gt;
stheight=0.65, &lt;BR /&gt;
lsec=0.05, &lt;BR /&gt;
backsec=0.05, &lt;BR /&gt;
backheight=0.3, &lt;BR /&gt;
bakon=1,&lt;BR /&gt;
bracetype=bv2,&lt;BR /&gt;
arms=0 &lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Good luck!</description>
      <pubDate>Tue, 12 Jan 2010 00:11:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164361#M22050</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-12T00:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164362#M22051</link>
      <description>Thank you for your assistance. However i did chech my script several times and the answer was "the gdl script is ok". Now that is strange. I will check the script carefuly and fix it as you say.I confess that i didn'it know some of the rules ,nor did i read them anywhere inside my gdl guide. I am not very satisfied with the guide since i needed external help several times.Anyway,I am going through the script once again.Hope it works!</description>
      <pubDate>Tue, 12 Jan 2010 10:47:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164362#M22051</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-12T10:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: parametric chair difficulties</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164363#M22052</link>
      <description>Yes it works!&lt;BR /&gt;
It doesn't look correct,i have to make some more adjustments on the script, however the last switch case finally works.&lt;BR /&gt;
Hurray!! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;</description>
      <pubDate>Tue, 12 Jan 2010 14:03:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/parametric-chair-difficulties/m-p/164363#M22052</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-12T14:03:56Z</dc:date>
    </item>
  </channel>
</rss>

