<?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: Define an array by composing the name of an object in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595285#M90210</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;You don't need the "Ref" variable. You could paste the expression that defines it directly into the Model.find() function. Or you use the "SizeRef1" array from further up which holds the same values.&lt;/DIV&gt;</description>
    <pubDate>Wed, 26 Jun 2024 11:20:49 GMT</pubDate>
    <dc:creator>moehlmann_fe</dc:creator>
    <dc:date>2024-06-26T11:20:49Z</dc:date>
    <item>
      <title>Define an array by composing the name of an object</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595282#M90207</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 24.1.0 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P id="isPasted"&gt;Hello &lt;/P&gt;
 &lt;P&gt;I can't share my files for privacity reason.&lt;/P&gt;
 &lt;P&gt;I hoppe you could help me.&lt;/P&gt;
 &lt;P&gt;I would like to set my Process Flow replicable to change a few labels at the begging of the Process and so to use de same activities and custom codes.&lt;/P&gt;
 &lt;P&gt;But, I have a problem to define a array which depend on an Object, composing its name&lt;/P&gt;
 &lt;P&gt;I attach same image to explaing it better.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P id="isPasted"&gt;I want compose the array Puestos1 without use a especificic references to the machine LR00&lt;/P&gt;
 &lt;P&gt;If I define the variable Array Puestos1 like:&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;span class="lia-inline-image-display-wrapper" image-alt="1719216065246.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1524360iE3D767B474762A21/image-size/large?v=v2&amp;amp;px=999" role="button" title="1719216065246.png" alt="1719216065246.png" /&gt;&lt;/span&gt;
 &lt;P&gt;Puestos1&lt;N&gt;=Model.find("PuestoLR00_"+ Ref&lt;N&gt;);&lt;/N&gt;&lt;/N&gt;&lt;/P&gt;
 &lt;P&gt;That it works well. &lt;/P&gt;
 &lt;P&gt;Return the correct array PuestosRef1 Array[2]: {/PuestoLR00_1,/PuestoLR00_2}&lt;/P&gt;
 &lt;P&gt;So I think the Array Ref is rigth defined.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;In other hand, If I define the variable Array Puestos1 like:&lt;span class="lia-inline-image-display-wrapper" image-alt="1719215406113.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1524361iA32C6DC22A14344C/image-size/large?v=v2&amp;amp;px=999" role="button" title="1719215406113.png" alt="1719215406113.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;Puestos1&lt;N&gt;=Model.find("Puesto'"+Linea+"'_"+ Ref&lt;N&gt;);&lt;/N&gt;&lt;/N&gt;&lt;/P&gt;
 &lt;P&gt;The array shows "no Path".&lt;/P&gt;
 &lt;P&gt;What am I doing wrong?&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thanks for your comments.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jun 2024 08:48:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595282#M90207</guid>
      <dc:creator>borja_lorenzo</dc:creator>
      <dc:date>2024-06-24T08:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Define an array by composing the name of an object</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595283#M90208</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Try removing the single quotation marks in line 25 (after "Puesto" and ahead of the underscore). I don't see those as a part of the object name so they are likely to blame for not finding the object.&lt;/P&gt;&lt;P&gt;In general I would advise to not use "Model.find()" too much. If you place the objects into a container later, for example, that would have to be accounted for in the path. I would suggest to use groups to organize objects instead. The model parameters can define the name of the group and which objects (indexes in the group) to use.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jun 2024 08:58:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595283#M90208</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2024-06-24T08:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Define an array by composing the name of an object</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595284#M90209</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hellos &lt;A rel="user" href="https://answers.flexsim.com/users/19365/felixmh.html" nodeid="19365"&gt;@Felix Möhlmann&lt;/A&gt; &lt;/P&gt;
 &lt;P&gt;I have another question related with this topic. I know if I shoul post a new question o following in this discution. Please let me know about that.&lt;BR /&gt;The point is:&lt;/P&gt;
 &lt;P&gt;I have componse an array "Puestos1" that reference several objects.&lt;/P&gt;
 &lt;P&gt;The name of this object is PuestoLR02_1, up to PuestoLR02_7&lt;/P&gt;
 &lt;P&gt;So I declare Puestos1 as:&lt;/P&gt;
 &lt;P&gt;Puestos1&lt;N&gt;=Model.find("PuestoLR02_"+ Model.parameters.LR02_Puestos_Ref1&lt;N&gt;);&lt;/N&gt;&lt;/N&gt;&lt;/P&gt;
 &lt;P&gt;The number after of the underscore comes from a parameters table:&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1719392156843.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1524351i5C6003EBCA6A47B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="1719392156843.png" alt="1719392156843.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;I have to declare a new variable array "Ref", from which get only the value to compose the whole name&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1719392130333.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1524353i61327EAB1C4EAFF2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1719392130333.png" alt="1719392130333.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Is there other solution to compose this without to declare the variable "Ref"?&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thanks for your comments&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Jun 2024 09:37:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595284#M90209</guid>
      <dc:creator>borja_lorenzo</dc:creator>
      <dc:date>2024-06-26T09:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Define an array by composing the name of an object</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595285#M90210</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;You don't need the "Ref" variable. You could paste the expression that defines it directly into the Model.find() function. Or you use the "SizeRef1" array from further up which holds the same values.&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Jun 2024 11:20:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595285#M90210</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2024-06-26T11:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Define an array by composing the name of an object</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595286#M90211</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P id="isPasted"&gt;Hello Felix, tank you for your answer.&lt;/P&gt;
 &lt;P&gt;Correct,&lt;/P&gt;
 &lt;P&gt;Ref=SizeRef1 is redundant.&lt;/P&gt;
 &lt;P&gt;However, I intended to write the expression Puestos1&lt;N&gt; directly, without any previously declared variable (SizeRef1 or Ref), as follows:&lt;/N&gt;&lt;/P&gt;
 &lt;P&gt;Puestos1&lt;N&gt;=Model.find("Puesto"+Linea+"_"+Model.parameters[Linea+"_Puestos_Ref1"].value);&lt;/N&gt;&lt;/P&gt;
 &lt;P&gt;This does not work.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Is that possible?&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Jul 2024 08:31:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595286#M90211</guid>
      <dc:creator>borja_lorenzo</dc:creator>
      <dc:date>2024-07-01T08:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Define an array by composing the name of an object</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595287#M90212</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Presumable the model parameter contains an array, so you still need to specify the index.&lt;/P&gt;&lt;P&gt;Model.find("Puesto"+Linea+"_"+Model.parameters[Linea+"_Puestos_Ref1"].value&lt;STRONG&gt;.as(Array)&lt;N&gt;&lt;/N&gt;&lt;/STRONG&gt;);&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Jul 2024 09:03:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595287#M90212</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2024-07-01T09:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Define an array by composing the name of an object</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595288#M90213</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Nice!!!, it works perfectly.
 &lt;P&gt;Thanks Felix.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Jul 2024 10:52:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/define-an-array-by-composing-the-name-of-an-object/m-p/13595288#M90213</guid>
      <dc:creator>borja_lorenzo</dc:creator>
      <dc:date>2024-07-01T10:52:51Z</dc:date>
    </item>
  </channel>
</rss>

