<?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: User command Question in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/user-command-question/m-p/14110103#M100890</link>
    <description>&lt;P&gt;It looks like the only parameter the code needs is the info table. You access parameters in the command code through "param(N)", where N is the position in the parameter list.&lt;/P&gt;&lt;P&gt;The two values would be returned as an array. You can then assign the result to individual variables if you want.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-04-29 101036.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1636662i4955EEB27FE16AF3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-04-29 101036.png" alt="Screenshot 2026-04-29 101036.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.flexsim.com/en/26.0/Reference/Tools/UserCommands/UserCommands.html" target="_blank"&gt;https://docs.flexsim.com/en/26.0/Reference/Tools/UserCommands/UserCommands.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Apr 2026 08:12:33 GMT</pubDate>
    <dc:creator>moehlmann_fe</dc:creator>
    <dc:date>2026-04-29T08:12:33Z</dc:date>
    <item>
      <title>User command Question</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/user-command-question/m-p/14108271#M100868</link>
      <description>&lt;P&gt;Hello FlexSim forums and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/17286793"&gt;@moehlmann_fe&lt;/a&gt;&amp;nbsp;&amp;nbsp;,&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;Because there is a lot of repeated code serving the same functionality in my main code, I would like to move those parts into a User Command and call it from the main code to simplify the overall structure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this logic, I record the object numbers for conveyor and non-conveyor objects, and store them in the variables &lt;STRONG&gt;ProcNum&lt;/STRONG&gt; and &lt;STRONG&gt;ConveyorNum&lt;/STRONG&gt;, which are then used later in the main code.&lt;/P&gt;&lt;P&gt;However, I am not very familiar with using User Commands yet (as shown in the picture below). Are there any recommended methods or best advise to implement this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="s1125413_0-1777346979667.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1636338iA65EAE9FDD0F6977/image-size/medium?v=v2&amp;amp;px=400" role="button" title="s1125413_0-1777346979667.png" alt="s1125413_0-1777346979667.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2026 03:29:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/user-command-question/m-p/14108271#M100868</guid>
      <dc:creator>s1125413</dc:creator>
      <dc:date>2026-04-28T03:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: User command Question</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/user-command-question/m-p/14110103#M100890</link>
      <description>&lt;P&gt;It looks like the only parameter the code needs is the info table. You access parameters in the command code through "param(N)", where N is the position in the parameter list.&lt;/P&gt;&lt;P&gt;The two values would be returned as an array. You can then assign the result to individual variables if you want.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-04-29 101036.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1636662i4955EEB27FE16AF3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-04-29 101036.png" alt="Screenshot 2026-04-29 101036.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.flexsim.com/en/26.0/Reference/Tools/UserCommands/UserCommands.html" target="_blank"&gt;https://docs.flexsim.com/en/26.0/Reference/Tools/UserCommands/UserCommands.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2026 08:12:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/user-command-question/m-p/14110103#M100890</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2026-04-29T08:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: User command Question</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/user-command-question/m-p/14111449#M100899</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/17286793"&gt;@moehlmann_fe&lt;/a&gt;&amp;nbsp;Thank you so much, this is a perfect example for me to learn from and to make use of User Commands!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2026 05:34:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/user-command-question/m-p/14111449#M100899</guid>
      <dc:creator>s1125413</dc:creator>
      <dc:date>2026-04-30T05:34:05Z</dc:date>
    </item>
  </channel>
</rss>

