<?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: Trouble adding columns and rows to in-memory tables in FlexScript in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581070#M79018</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;Maybe you need another table operation, like adding values to cells.&lt;/DIV&gt;</description>
    <pubDate>Wed, 03 May 2023 10:38:29 GMT</pubDate>
    <dc:creator>joerg_vogel_HsH</dc:creator>
    <dc:date>2023-05-03T10:38:29Z</dc:date>
    <item>
      <title>Trouble adding columns and rows to in-memory tables in FlexScript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581069#M79017</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 23.1.1 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;DIV id="isPasted" style="display: flex; flex-direction: column; box-sizing: border-box; padding: 10px 16px; user-select: text; word-break: break-word; font-size: var(--cib-type-body2-font-size); line-height: var(--cib-type-body2-line-height); font-weight: var(--cib-type-body2-font-weight); font-variation-settings: var(--cib-type-body2-font-variation-settings);"&gt;
  &lt;DIV style="display: flex; flex-direction: column; padding: 0px; margin: 0px; user-select: text; word-break: break-word; font-size: var(--cib-type-body2-font-size); line-height: var(--cib-type-body2-line-height); font-weight: var(--cib-type-body2-font-weight); font-variation-settings: var(--cib-type-body2-font-variation-settings);"&gt;
   &lt;DIV style="margin-top: 0px !important; display: flex; flex-direction: column; color: var(--cib-color-neutral-foreground);"&gt;
    &lt;P style="padding: 0px; margin-top: 10px !important; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; user-select: text; word-break: break-word; font-size: var(--cib-type-body2-font-size); line-height: var(--cib-type-body2-line-height); font-weight: var(--cib-type-body2-font-weight); font-variation-settings: var(--cib-type-body2-font-variation-settings);"&gt;I’m trying to use in-memory tables in FlexScript to perform some calculations. However, I’m having trouble adding columns and rows to the tables. I don’t want to create Global Tables.&lt;/P&gt;
    &lt;P style="padding: 0px; margin-top: 10px !important; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; user-select: text; word-break: break-word; font-size: var(--cib-type-body2-font-size); line-height: var(--cib-type-body2-line-height); font-weight: var(--cib-type-body2-font-weight); font-variation-settings: var(--cib-type-body2-font-variation-settings);"&gt;Here’s the script I’ve tried, but the return value is zero:&lt;/P&gt;
    &lt;PRE style="margin: 0px 0px 4px; background: rgba(0, 0, 0, 0.02); border-radius: 8px; padding: 10px; box-sizing: border-box; border: 1px solid var(--cib-color-neutral-stroke);"&gt;&lt;CODE style="white-space: pre-wrap; font-size: 14px;"&gt;Table testTable;
testTable.setSize(4,4, DATATYPE_NUMBER);
return(testTable.numCols);
&lt;/CODE&gt;&lt;/PRE&gt;
    &lt;P style="padding: 0px; margin-top: 10px !important; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; user-select: text; word-break: break-word; font-size: var(--cib-type-body2-font-size); line-height: var(--cib-type-body2-line-height); font-weight: var(--cib-type-body2-font-weight); font-variation-settings: var(--cib-type-body2-font-variation-settings);"&gt;Can anyone help me figure out what I’m doing wrong?&lt;/P&gt;
   &lt;/DIV&gt;
  &lt;/DIV&gt;
 &lt;/DIV&gt;
 &lt;DIV style="top: 0px; left: -2px; width: 1px; height: 1px; position: absolute; overflow: hidden; color: rgb(17, 17, 17); font-family: -apple-system, Roboto, SegoeUI, "&gt;
  Mensaje recibido. Sure! Here's a revised version of your text: I'm trying to use in-memory tables in FlexScript to perform some calculations. However, I'm having trouble adding columns and rows to the tables. I don't want to create Global Tables. Here's the script I've tried, but the return value is zero: ``` Table testTable; testTable.setSize(4,4, DATATYPE_NUMBER); return(testTable.numCols); ``` Can anyone help me figure out what I'm doing wrong?
 &lt;/DIV&gt;
 &lt;DIV style="display: flex; flex-direction: row; box-sizing: border-box; padding: 0px; user-select: text; word-break: break-word; font-size: var(--cib-type-body2-font-size); line-height: var(--cib-type-body2-line-height); font-weight: 400; font-variation-settings: var(--cib-type-body2-font-variation-settings); align-items: flex-start; justify-content: flex-end; border-top: 1px solid var(--cib-color-neutral-stroke); color: rgb(17, 17, 17); font-family: -apple-system, Roboto, SegoeUI, "&gt;
  &lt;DIV style="display: flex; gap: 3px; font-weight: 600; line-height: 24px; font-size: var(--cib-type-body1-font-size);"&gt;
   &lt;BR /&gt;
  &lt;/DIV&gt;
 &lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 May 2023 09:46:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581069#M79017</guid>
      <dc:creator>ABarranco</dc:creator>
      <dc:date>2023-05-03T09:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble adding columns and rows to in-memory tables in FlexScript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581070#M79018</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Maybe you need another table operation, like adding values to cells.&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 May 2023 10:38:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581070#M79018</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2023-05-03T10:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble adding columns and rows to in-memory tables in FlexScript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581071#M79019</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thank you for your suggestion. I tried adding values to cells, but I got an exception error: “FlexScript exception: Invalid row number: 1 in &amp;lt;no path&amp;gt; at &amp;lt;no path&amp;gt; c: &amp;lt;no path&amp;gt; i: &amp;lt;no path&amp;gt;”.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 May 2023 10:52:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581071#M79019</guid>
      <dc:creator>ABarranco</dc:creator>
      <dc:date>2023-05-03T10:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble adding columns and rows to in-memory tables in FlexScript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581072#M79020</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P id="isPasted" style="padding: 0px; margin-top: 10px !important; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; user-select: text; word-break: break-word; font-size: 16px; line-height: var(--cib-type-body2-line-height); font-weight: 400; font-variation-settings: var(--cib-type-body2-font-variation-settings); color: rgb(17, 17, 17); font-family: -apple-system, Roboto, SegoeUI, "&gt;I found a solution that works, but it seems a bit unconventional. Here’s the script I used:&lt;/P&gt;
 &lt;PRE style="margin: 0px 0px 4px; background: rgba(0, 0, 0, 0.02); border-radius: 8px; padding: 10px; box-sizing: border-box; border: 1px solid var(--cib-color-neutral-stroke); color: rgb(17, 17, 17); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"&gt;&lt;CODE style="white-space: pre-wrap; font-size: 14px;"&gt;Array testArray;
Table testTable = testArray.as(Table);
testTable.addRow();
testTable.addCol();
return testTable.numCols;
&lt;/CODE&gt;&lt;/PRE&gt;
 &lt;P style="padding: 0px; margin-top: 10px !important; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; user-select: text; word-break: break-word; font-size: 16px; line-height: var(--cib-type-body2-line-height); font-weight: 400; font-variation-settings: var(--cib-type-body2-font-variation-settings); color: rgb(17, 17, 17); font-family: -apple-system, Roboto, SegoeUI, "&gt;Is there a more standard way to achieve the same result?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 May 2023 11:53:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581072#M79020</guid>
      <dc:creator>ABarranco</dc:creator>
      <dc:date>2023-05-03T11:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble adding columns and rows to in-memory tables in FlexScript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581073#M79021</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The array approach is probably as good as any but be aware that some functions  that have a table passed to them (eg. &lt;EM&gt;dempirical&lt;/EM&gt;)  will require a node containing the table data. In those cases you can create a temporary node and destroy it afterwards (I often create a user command called '&lt;EM&gt;createtempnode&lt;/EM&gt;' which places nodes in a new folder at 'Tools/temp' and returns a pointer to the node).&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 May 2023 12:58:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581073#M79021</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2023-05-03T12:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble adding columns and rows to in-memory tables in FlexScript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581074#M79022</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;SPAN id="isPasted" style="color: rgb(17, 17, 17); font-family: -apple-system, Roboto, SegoeUI, "&gt;Thank you &lt;A rel="user" href="https://answers.flexsim.com/users/226/jason.l.html" nodeid="226"&gt;@Jason Lightfoot&lt;/A&gt;! I will keep your suggestion about the nodes in mind and follow your same strategy.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 May 2023 13:16:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/trouble-adding-columns-and-rows-to-in-memory-tables-in/m-p/13581074#M79022</guid>
      <dc:creator>ABarranco</dc:creator>
      <dc:date>2023-05-03T13:16:37Z</dc:date>
    </item>
  </channel>
</rss>

