<?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 Can someone show me how to use and array for this task. in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23753#M34117</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I am trying to create a custom library part that repeats a shape (cprism) in a pattern based on the overall user defined size. I can make the rows and column I need but I would like to give the option of allowing the material of each individual shape to be selected via a material array. Since the locations are based a loop that determines X and Y, I need to pull the material from the array in the loop. Does anyone have any idea's or a better approach? &lt;BR /&gt;
 &lt;BR /&gt;
Thanks in advance. &lt;BR /&gt;
 &lt;BR /&gt;
Brian&lt;/T&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 06 Jul 2006 15:08:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-07-06T15:08:22Z</dc:date>
    <item>
      <title>Can someone show me how to use and array for this task.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23753#M34117</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I am trying to create a custom library part that repeats a shape (cprism) in a pattern based on the overall user defined size. I can make the rows and column I need but I would like to give the option of allowing the material of each individual shape to be selected via a material array. Since the locations are based a loop that determines X and Y, I need to pull the material from the array in the loop. Does anyone have any idea's or a better approach? &lt;BR /&gt;
 &lt;BR /&gt;
Thanks in advance. &lt;BR /&gt;
 &lt;BR /&gt;
Brian&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Jul 2006 15:08:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23753#M34117</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-06T15:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone show me how to use and array for this task.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23754#M34118</link>
      <description>I'm not sure I'm following. The materials change from cprism to cprism? You would need a separate parameter array for the materials, since it's a different parameter type. (You couldn't have [1][1]=1', [2][1]=2', [3][1]='Brick')&lt;BR /&gt;
&lt;BR /&gt;
Within the loop, you can refer to as many arrays as you want.&lt;BR /&gt;

&lt;PRE&gt;!! I assume you've defined the arrays.
FOR k=1 TO n
X1=points[1]&lt;K&gt;
Y1=points[2]&lt;K&gt;
MATERIAL mats&lt;K&gt;
ADD X1, Y1, 0
CPRISM bla, bla, bla,
DEL 1
NEXT k&lt;/K&gt;&lt;/K&gt;&lt;/K&gt;&lt;/PRE&gt;

 &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;</description>
      <pubDate>Thu, 06 Jul 2006 17:33:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23754#M34118</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2006-07-06T17:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone show me how to use and array for this task.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23755#M34119</link>
      <description>James:  Thanks for your response. All that I am trying to do is allow different material be selected from an array each time a routine passes through a loop. The material in the array needs to be user defined for each object created by the loop. Spacing of objects is already calculated by the code. I have purchased objects/library parts before that allow user to edit tables (or arrays) to change materials. &lt;BR /&gt;
&lt;BR /&gt;
For example: My program places "Golf Tee" shaped items on a 1' x 1' grid. If the user inputs a grid that is 10' x 10', it will produce 100 TEEs. I would like to edit a material property to produce a user editable array (or table) of the 100 TEEs with the ability to designate the color of each individual TEE.</description>
      <pubDate>Thu, 06 Jul 2006 18:16:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23755#M34119</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-06T18:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone show me how to use and array for this task.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23756#M34120</link>
      <description>Hmm. You want 100 material parameters? Or even n^2 material parameters?&lt;BR /&gt;
&lt;BR /&gt;
The 100 is feasible, you can use a parameter array, [10][10]. The n^2 is tough. The only way to offer all the materials to the user is in a parameter array, and I don't think those can be of indefinite dimension. You would have to set some sort of limit for n.&lt;BR /&gt;
&lt;BR /&gt;
Then you would probably want a UI script to make it tolerable to have so many parameters.&lt;BR /&gt;
&lt;BR /&gt;
Can I ask who would want to set n^2 materials?  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_wink.gif" style="display : inline;" /&gt; Maybe you could do a smaller set of mats and randomize them across all the parts. I've seen that done, would have to check into how... &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_wink.gif" style="display : inline;" /&gt;</description>
      <pubDate>Fri, 07 Jul 2006 00:50:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23756#M34120</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2006-07-07T00:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone show me how to use and array for this task.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23757#M34121</link>
      <description>Brian,&lt;BR /&gt;
&lt;BR /&gt;
bad news mate, you can't have a dynamic array as a part of UI.&lt;BR /&gt;
What that means:&lt;BR /&gt;
 if you want to allow changing parameters as you are suggesting the particular parameter must be listed (defined) as an array parameter in the parameter list in order to use that in the UI script. As you may have noticed the parameter list does not allow you to define dynamic array (in other words any array variable has to have its limits in the parameter list). Therefore this limitation imposes maximum number of instances (so if you wanted to have 5000 golf tees you would have to define (manually) an array parameter with size of [5000] - I suppose, you would click yourself to death...)</description>
      <pubDate>Fri, 07 Jul 2006 01:03:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23757#M34121</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2006-07-07T01:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone show me how to use and array for this task.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23758#M34122</link>
      <description>You can define arrays ynamical, but only in one direction. You can increase the number of rows and cols, but not decrease.&lt;BR /&gt;
&lt;BR /&gt;
Since AC8 you can create dynamical arrays in the script and you can expand parameter arrays of the parameter list by setting a value to one more dimension.&lt;BR /&gt;
&lt;BR /&gt;
Candle with hair. RAM is not indefinite.</description>
      <pubDate>Fri, 07 Jul 2006 06:30:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23758#M34122</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-07-07T06:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone show me how to use and array for this task.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23759#M34123</link>
      <description>I hope this will help.&lt;BR /&gt;
&lt;BR /&gt;
-------------------------------------------&lt;BR /&gt;
We need to add 2 parameters:&lt;BR /&gt;
  spa_max ---- Max. Spacing.&lt;BR /&gt;
  mat ----------- Materials array&lt;BR /&gt;
-------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-------------------------------------------&lt;BR /&gt;
!!!!! In Master Scripts&lt;BR /&gt;
&lt;BR /&gt;
nx=CEIL(a/spa_max)  !!number of repeating OBJ in x-direction&lt;BR /&gt;
ny=CEIL(b/spa_max)  !!number of repeating OBJ in y-direction&lt;BR /&gt;
&lt;BR /&gt;
spacing_x=a/nx  !!actual spacing in x-direction&lt;BR /&gt;
spacing_y=b/ny  !!actual spacing in y-direction&lt;BR /&gt;
&lt;BR /&gt;
PARAMETERS mat[nx+1][ny+1]=0  !!To increase Array size&lt;BR /&gt;
-------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-------------------------------------------&lt;BR /&gt;
!!!!! In 3D Scripts&lt;BR /&gt;
&lt;BR /&gt;
FOR i=1 to nx&lt;BR /&gt;
	FOR j=1 to ny&lt;BR /&gt;
		MATERIAL mat&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;&lt;J&gt;&lt;BR /&gt;
		ADD (i-1)*spacing_x, (j-1)*spacing_y, 0&lt;BR /&gt;
		PRISM_ 4,0.01,&lt;BR /&gt;
			0,0,15,&lt;BR /&gt;
			0,0.1,15,&lt;BR /&gt;
			0.1,0.1,15,&lt;BR /&gt;
			0.1,0,15&lt;BR /&gt;
		DEL 1&lt;BR /&gt;
	NEXT j	&lt;BR /&gt;
NEXT i&lt;BR /&gt;
-------------------------------------------&lt;/J&gt;</description>
      <pubDate>Fri, 07 Jul 2006 08:44:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23759#M34123</guid>
      <dc:creator>LiHigh</dc:creator>
      <dc:date>2006-07-07T08:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone show me how to use and array for this task.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23760#M34124</link>
      <description>oops, so I was wrong... &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt;</description>
      <pubDate>Fri, 07 Jul 2006 10:05:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23760#M34124</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2006-07-07T10:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone show me how to use and array for this task.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23761#M34125</link>
      <description>Thank you all so much. Using the scripts you provided I am able to create the part I need. Thanks again.&lt;BR /&gt;
&lt;BR /&gt;
Brian</description>
      <pubDate>Fri, 07 Jul 2006 12:56:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-someone-show-me-how-to-use-and-array-for-this-task/m-p/23761#M34125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-07T12:56:01Z</dc:date>
    </item>
  </channel>
</rss>

