<?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: How to set the rail length of ASRS vehicle using Flexscript in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-the-rail-length-of-asrs-vehicle-using-flexscript/m-p/13483095#M2211</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The rails and beam are components of the ASRSvehicle and can be accessed as objects through "object.attrs.drawsurrogate.subnodes[]". The names/ranks needed to access the correct component can be seen in the animation editor.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1648714304092.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1509690iBF4912A4B417621F/image-size/large?v=v2&amp;amp;px=999" role="button" title="1648714304092.png" alt="1648714304092.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Once you have a reference to the object you can set the size (and other properties) like you would with any other object (object.size.x/y/z).&lt;/P&gt;&lt;P&gt;As an example, the code in the script window in the attached model, randomizes both the rail lengths and the beam height. Note, that the ladder is part of the "Car" component, which you might want to adjust together with the beam size.&lt;/P&gt;&lt;PRE&gt;// Randomize the length of rails
double rand = uniform(10, 40);
Object lowerRail = ASRS.attrs.drawsurrogate.subnodes["BottomRail"];
Object upperRail = ASRS.attrs.drawsurrogate.subnodes["TopRail"];
lowerRail.size.x = rand;
upperRail.size.x = rand;&lt;/PRE&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/50522-changeasrsbycode.fsm" target="_blank"&gt;ChangeASRSByCode.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 31 Mar 2022 08:14:48 GMT</pubDate>
    <dc:creator>moehlmann_fe</dc:creator>
    <dc:date>2022-03-31T08:14:48Z</dc:date>
    <item>
      <title>How to set the rail length of ASRS vehicle using Flexscript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-the-rail-length-of-asrs-vehicle-using-flexscript/m-p/13483094#M2210</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.2.0 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;Hi! I want to set the rail length and also the beam height of an ASRSvehicle using Flexscipt. Is there a way to do that? Thanks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 30 Mar 2022 18:05:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-the-rail-length-of-asrs-vehicle-using-flexscript/m-p/13483094#M2210</guid>
      <dc:creator>julius_j2</dc:creator>
      <dc:date>2022-03-30T18:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the rail length of ASRS vehicle using Flexscript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-the-rail-length-of-asrs-vehicle-using-flexscript/m-p/13483095#M2211</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The rails and beam are components of the ASRSvehicle and can be accessed as objects through "object.attrs.drawsurrogate.subnodes[]". The names/ranks needed to access the correct component can be seen in the animation editor.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1648714304092.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1509690iBF4912A4B417621F/image-size/large?v=v2&amp;amp;px=999" role="button" title="1648714304092.png" alt="1648714304092.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Once you have a reference to the object you can set the size (and other properties) like you would with any other object (object.size.x/y/z).&lt;/P&gt;&lt;P&gt;As an example, the code in the script window in the attached model, randomizes both the rail lengths and the beam height. Note, that the ladder is part of the "Car" component, which you might want to adjust together with the beam size.&lt;/P&gt;&lt;PRE&gt;// Randomize the length of rails
double rand = uniform(10, 40);
Object lowerRail = ASRS.attrs.drawsurrogate.subnodes["BottomRail"];
Object upperRail = ASRS.attrs.drawsurrogate.subnodes["TopRail"];
lowerRail.size.x = rand;
upperRail.size.x = rand;&lt;/PRE&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/50522-changeasrsbycode.fsm" target="_blank"&gt;ChangeASRSByCode.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 31 Mar 2022 08:14:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-the-rail-length-of-asrs-vehicle-using-flexscript/m-p/13483095#M2211</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2022-03-31T08:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the rail length of ASRS vehicle using Flexscript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-the-rail-length-of-asrs-vehicle-using-flexscript/m-p/13483096#M2212</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/34445/juliusj2.html" nodeid="34445"&gt;@Julius J2&lt;/A&gt;, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.&lt;/P&gt;&lt;P&gt;If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Apr 2022 18:06:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-the-rail-length-of-asrs-vehicle-using-flexscript/m-p/13483096#M2212</guid>
      <dc:creator>ryan_c10</dc:creator>
      <dc:date>2022-04-05T18:06:56Z</dc:date>
    </item>
  </channel>
</rss>

