<?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 Fetching Option Parameter Label in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/fetching-option-parameter-label/m-p/13657875#M96411</link>
    <description>&lt;P&gt;I am using a global table to store part information such as inspection frequencies and machining times. Each row header is a specific part number and each column header is what machine or frequency is stored in that row. I am using an option parameter to select which part number to run in the simulation. I am currently using the integer value stored with the option parameter to decide which row and manually setting the column number when applying code to return the process time. This works, but if the integer value stored in the option parameter does not match the global table row number it will be pulling the incorrect data. Is there a way to get the string value from the option parameter ("PartX") and use that to get the row number with table.getRowNum?&lt;/P&gt;</description>
    <pubDate>Fri, 30 May 2025 13:24:49 GMT</pubDate>
    <dc:creator>SchreyerNicholasB</dc:creator>
    <dc:date>2025-05-30T13:24:49Z</dc:date>
    <item>
      <title>Fetching Option Parameter Label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/fetching-option-parameter-label/m-p/13657875#M96411</link>
      <description>&lt;P&gt;I am using a global table to store part information such as inspection frequencies and machining times. Each row header is a specific part number and each column header is what machine or frequency is stored in that row. I am using an option parameter to select which part number to run in the simulation. I am currently using the integer value stored with the option parameter to decide which row and manually setting the column number when applying code to return the process time. This works, but if the integer value stored in the option parameter does not match the global table row number it will be pulling the incorrect data. Is there a way to get the string value from the option parameter ("PartX") and use that to get the row number with table.getRowNum?&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 13:24:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/fetching-option-parameter-label/m-p/13657875#M96411</guid>
      <dc:creator>SchreyerNicholasB</dc:creator>
      <dc:date>2025-05-30T13:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching Option Parameter Label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/fetching-option-parameter-label/m-p/13659694#M96416</link>
      <description>&lt;P&gt;&lt;BR /&gt;&lt;A href="https://docs.flexsim.com/en/23.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Data/Table.html#Method-getRowByKey" target="_blank" rel="noopener"&gt;Row by Key&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or smarter&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.flexsim.com/en/23.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Data/Table.html#Method-getValueByKey" target="_blank" rel="noopener"&gt;Value of column by a key of a different column &lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jun 2025 06:21:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/fetching-option-parameter-label/m-p/13659694#M96416</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2025-06-01T06:21:06Z</dc:date>
    </item>
    <item>
      <title>Betreff: Fetching Option Parameter Label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/fetching-option-parameter-label/m-p/13660833#M96433</link>
      <description>&lt;P&gt;You can get the option name with something like this and then use the name to refer to the row directly (row can be identified by either row number or header).&lt;/P&gt;&lt;LI-CODE lang="general"&gt;treenode valueNode = Model.parameters["PartX"];
treenode options = valueNode.subnodes["options"];
string optionName = options.subnodes[valueNode.value].name;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But using numbers to access the row is faster, so I would suggest to go the opposite way and update the parameter options based on the global table so you can be sure that they match.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Variant valueNode = Model.parameters["PartX"];
treenode options = valueNode.subnodes["options"];
options.subnodes.clear();

Table partTable = Table("...");
for(int row = 1; row &amp;lt;= partTable.numRows; row++)
{
	treenode option = options.subnodes.assert(partTable.getRowHeader(row), row);
}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 02 Jun 2025 07:58:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/fetching-option-parameter-label/m-p/13660833#M96433</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2025-06-02T07:58:42Z</dc:date>
    </item>
  </channel>
</rss>

