<?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 How creat new GlobalTable by code ? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-creat-new-globaltable-by-code/m-p/13588457#M84921</link>
    <description>&lt;P&gt;&lt;I&gt;[ FlexSim 22.2.4 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;P id="isPasted"&gt;How creat new GlobalTable by code ? I  tried using code&lt;/P&gt;&lt;P&gt;Table new = applicationcommand("addglobaltable", 1) ;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;and creatcopy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;Unfortunately, the table I created behaves differently when setting its size or adding rows and columns.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1699433122272.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1520956iFD496254625A103D/image-size/large?v=v2&amp;amp;px=999" role="button" title="1699433122272.png" alt="1699433122272.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Table "Op_Dystans" was created by use above code.&lt;/P&gt;&lt;P&gt;When I try to add new rows and columns, additional nodes are created and the system sees a different number of columns and rows than it actually is.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1699433707273.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1520957i697097983D9025C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="1699433707273.png" alt="1699433707273.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Is there another way to create a Table using code?&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 08 Nov 2023 08:56:23 GMT</pubDate>
    <dc:creator>patryk_u2</dc:creator>
    <dc:date>2023-11-08T08:56:23Z</dc:date>
    <item>
      <title>How creat new GlobalTable by code ?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-creat-new-globaltable-by-code/m-p/13588457#M84921</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 22.2.4 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;P id="isPasted"&gt;How creat new GlobalTable by code ? I  tried using code&lt;/P&gt;&lt;P&gt;Table new = applicationcommand("addglobaltable", 1) ;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;and creatcopy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;Unfortunately, the table I created behaves differently when setting its size or adding rows and columns.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1699433122272.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1520956iFD496254625A103D/image-size/large?v=v2&amp;amp;px=999" role="button" title="1699433122272.png" alt="1699433122272.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Table "Op_Dystans" was created by use above code.&lt;/P&gt;&lt;P&gt;When I try to add new rows and columns, additional nodes are created and the system sees a different number of columns and rows than it actually is.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1699433707273.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1520957i697097983D9025C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="1699433707273.png" alt="1699433707273.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Is there another way to create a Table using code?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Nov 2023 08:56:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-creat-new-globaltable-by-code/m-p/13588457#M84921</guid>
      <dc:creator>patryk_u2</dc:creator>
      <dc:date>2023-11-08T08:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: How creat new GlobalTable by code ?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-creat-new-globaltable-by-code/m-p/13588458#M84922</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The "intended" command currently is &lt;EM&gt;Tools.create("GlobalTable") &lt;/EM&gt;as far as I'm aware.&lt;/P&gt;&lt;P&gt;Crucially, both this command, as well as the applicationcommand you are using return a reference to the table &lt;EM&gt;object&lt;/EM&gt; that gets created. If you cast this as a table, the situation in your screenshot happens, where the table node structure is created as subnodes of that object. If you then later refer to it through the table constructor, it will access the data structure in the attribute tree which you didn't change.&lt;/P&gt;&lt;P&gt;You want to either get a reference to the proper table node by using the object name or by casting the "data" node inside the attribute tree as a table.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1699437771020.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1520955iCA59D0EC4BEA7967/image-size/large?v=v2&amp;amp;px=999" role="button" title="1699437771020.png" alt="1699437771020.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;treenode tableObject = Tools.create("GlobalTable");&lt;BR /&gt;Table table1 = Table(tableObject.name);
Table table2 = tableObject.find("&amp;gt;variables/data");  // table1 and table2 are the same table&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Nov 2023 10:06:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-creat-new-globaltable-by-code/m-p/13588458#M84922</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2023-11-08T10:06:23Z</dc:date>
    </item>
  </channel>
</rss>

