<?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 Repeating 'stretchy' element object in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Repeating-stretchy-element-object/m-p/221738#M9513</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I'm having some trouble with MUL code.&lt;BR /&gt;
&lt;BR /&gt;
I have a bunch of LIN_ lines I want to copy around in a grid, but I want to adjust the height and width of the copies a bit to fit the height and width of the  object.&lt;BR /&gt;
&lt;BR /&gt;
I have the following code, but it bugs out:
&lt;PRE&gt;pen gs_cont_pen											
aa=0.3466! this is the actual width of the original
zz=0.4041!this is the actual height of the original
n1=round_int(a/aa)!divide A by the original width to get a round number
n2=round_int(zzyzx/zz)!divide ZZYZX by original height to get a round number
aaa=a/n1!this should calculate the new width of element
zzz=zzyzx/n2!this should calculate the new height of element

for herh2 = 1 to n2 !repeat vertical
for herh1 = 1 to n1 !repeat horizontal
MULX aa/aaa!adjust width to new width
MULZ zz/zzz!adjust heigh to new height

!! here are all the LIN_ statements for my shape for sake of simplicity, one line
LIN_ 0,0,0, 0.3466,0,0.4041
addx aaa !move in x direction
next herh1
del n1
addz zzz !move in y direction
next herh2&lt;/PRE&gt;

Does anyone know where I've made a mistake in the code?&lt;/R&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 06 Oct 2015 12:41:05 GMT</pubDate>
    <dc:creator>Erwin Edel</dc:creator>
    <dc:date>2015-10-06T12:41:05Z</dc:date>
    <item>
      <title>Repeating 'stretchy' element object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Repeating-stretchy-element-object/m-p/221738#M9513</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I'm having some trouble with MUL code.&lt;BR /&gt;
&lt;BR /&gt;
I have a bunch of LIN_ lines I want to copy around in a grid, but I want to adjust the height and width of the copies a bit to fit the height and width of the  object.&lt;BR /&gt;
&lt;BR /&gt;
I have the following code, but it bugs out:
&lt;PRE&gt;pen gs_cont_pen											
aa=0.3466! this is the actual width of the original
zz=0.4041!this is the actual height of the original
n1=round_int(a/aa)!divide A by the original width to get a round number
n2=round_int(zzyzx/zz)!divide ZZYZX by original height to get a round number
aaa=a/n1!this should calculate the new width of element
zzz=zzyzx/n2!this should calculate the new height of element

for herh2 = 1 to n2 !repeat vertical
for herh1 = 1 to n1 !repeat horizontal
MULX aa/aaa!adjust width to new width
MULZ zz/zzz!adjust heigh to new height

!! here are all the LIN_ statements for my shape for sake of simplicity, one line
LIN_ 0,0,0, 0.3466,0,0.4041
addx aaa !move in x direction
next herh1
del n1
addz zzz !move in y direction
next herh2&lt;/PRE&gt;

Does anyone know where I've made a mistake in the code?&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Oct 2015 12:41:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Repeating-stretchy-element-object/m-p/221738#M9513</guid>
      <dc:creator>Erwin Edel</dc:creator>
      <dc:date>2015-10-06T12:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating 'stretchy' element object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Repeating-stretchy-element-object/m-p/221739#M9514</link>
      <description>Still playing around with this bit of code
&lt;PRE&gt;pen gs_cont_pen                                  

aa=0.3466! this is the actual width of the original 
zz=0.4041!this is the actual height of the original 
n1=round_int(a/aa)!divide A by the original width to get a round number 
n2=round_int(zzyzx/zz)!divide ZZYZX by original height to get a round number 

aaa=a/n1!this should calculate the new width of element 
zzz=zzyzx/n2!this should calculate the new height of element 

MULX aa/aaa!adjust width to new width 
MULZ zz/zzz!adjust heigh to new height 
for herh2 = 1 to n2 !repeat vertical 
for herh1 = 1 to n1 !repeat horizontal 

!! here are all the LIN_ statements for my shape for sake of simplicity, one line 
BODY -1
LIN_ 0,0,0, 0,0,zz 
LIN_ 0,0,0, aa,0,0

addx aa !move in x direction 

next herh1 
del n1
addz zz !move in y direction 
next herh2
&lt;/PRE&gt;
Small modification, but it still doesn't work like I want it to.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have an idea how to make it work?</description>
      <pubDate>Thu, 08 Oct 2015 14:36:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Repeating-stretchy-element-object/m-p/221739#M9514</guid>
      <dc:creator>Erwin Edel</dc:creator>
      <dc:date>2015-10-08T14:36:09Z</dc:date>
    </item>
  </channel>
</rss>

