<?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: Storage Slot Label Painter Not Auto Updating After Label Node Removal in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/storage-slot-label-painter-not-auto-updating-after-label-node/m-p/13558539#M61575</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hey &lt;A rel="user" href="https://answers.flexsim.com/users/626/stan.d.html" nodeid="626"&gt;@Stan Davis&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;It's hard to know how to help without looking at your model. To receive a more accurate solution, please post your model or a sample model that demonstrates your question.&lt;/P&gt;&lt;P&gt;Proprietary models can be posted as a private question visible only to FlexSim U.S. support staff. You can also &lt;A href="https://flexs.im/contact"&gt;contact your local FlexSim distributor&lt;/A&gt; for phone or email help.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 30 Aug 2022 17:16:22 GMT</pubDate>
    <dc:creator>kavika_faleumu</dc:creator>
    <dc:date>2022-08-30T17:16:22Z</dc:date>
    <item>
      <title>Storage Slot Label Painter Not Auto Updating After Label Node Removal</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/storage-slot-label-painter-not-auto-updating-after-label-node/m-p/13558538#M61574</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 22.2.1 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I am developing a method that clears any existing slot labels before repainting slot labels based on an external file using the function_s method.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Here is my code that removes the 'SegmentA' label's subnode under the slot's 'slotLables' and 'resetLabels' nodes.&lt;/P&gt;
 &lt;PRE&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp;Storage.Object rack = Model.find("Rack_D40_A");
 &amp;nbsp; &amp;nbsp;for (int i = 1; i &amp;lt;= rack.bays.length; i++) {
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Storage.Bay bay = rack.bays&lt;I&gt;;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (int j = 1; j &amp;lt;= bay.levels.length; j++) {
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Storage.Level level = bay.levels&lt;J&gt;;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (int k = 1; k &amp;lt;= level.slots.length; k++) {

 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
treenode mytreeslot = &amp;nbsp;level.slots&lt;K&gt;.as(treenode); 
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // This destroys the slotLabels subnodes
if (mytreeslot.find("slotLabels")) { 
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;treenode myslotLabels = mytreeslot.find("slotLabels");
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;if ( myslotLabels.find("SegmentA") ) {
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;myslotLabels.find("SegmentA").destroy();
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;}
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;

}
else { &amp;nbsp; 
//msg("hello","slotLabels do not exist");
}


 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // This destroys the resetLabels subnodes
if (mytreeslot.find("resetLabels")) { 

 &amp;nbsp; &amp;nbsp; &amp;nbsp;treenode myresetLabels = mytreeslot.find("resetLabels");
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;if ( myresetLabels.find("SegmentA") ) {
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;myresetLabels.find("SegmentA").destroy();
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;}

}
else { &amp;nbsp; 
//msg("hello","resetLabels do not exist");
} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;

 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
 &amp;nbsp; &amp;nbsp;}
 &amp;nbsp; &amp;nbsp;
&amp;nbsp;&lt;/K&gt;&lt;/J&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;The problem is that after I run the code and verify the labels have been removed from the Tree, the 'Paint Slot Labels' tool will still show the labels applied until I select a different slot label in the properties panel and then re-select the label that I had removed to see the change...&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1661799542267.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1512579iEA75970C6F1E6566/image-size/large?v=v2&amp;amp;px=999" role="button" title="1661799542267.png" alt="1661799542267.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;How do I get the 'Paint Slot Labels' tool to auto refresh and reflect the change to the Tree?? I realize this is rather minor, but I think I am just missing some reset/refresh command in my code. Thanks - Stan&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 29 Aug 2022 19:29:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/storage-slot-label-painter-not-auto-updating-after-label-node/m-p/13558538#M61574</guid>
      <dc:creator>stan_e_davis</dc:creator>
      <dc:date>2022-08-29T19:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Storage Slot Label Painter Not Auto Updating After Label Node Removal</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/storage-slot-label-painter-not-auto-updating-after-label-node/m-p/13558539#M61575</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hey &lt;A rel="user" href="https://answers.flexsim.com/users/626/stan.d.html" nodeid="626"&gt;@Stan Davis&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;It's hard to know how to help without looking at your model. To receive a more accurate solution, please post your model or a sample model that demonstrates your question.&lt;/P&gt;&lt;P&gt;Proprietary models can be posted as a private question visible only to FlexSim U.S. support staff. You can also &lt;A href="https://flexs.im/contact"&gt;contact your local FlexSim distributor&lt;/A&gt; for phone or email help.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 30 Aug 2022 17:16:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/storage-slot-label-painter-not-auto-updating-after-label-node/m-p/13558539#M61575</guid>
      <dc:creator>kavika_faleumu</dc:creator>
      <dc:date>2022-08-30T17:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Storage Slot Label Painter Not Auto Updating After Label Node Removal</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/storage-slot-label-painter-not-auto-updating-after-label-node/m-p/13558540#M61576</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You could call the paintLabels function_s in your script since that function marks the rack's meshes as dirty and then rebuilds them the next time the view paints. For example:&lt;/P&gt;&lt;PRE&gt;Storage.Object rack = Model.find("Rack_D40_A");
string labelName = "SegmentA";

//Call paintLabels so the rack's meshes are marked dirty for the next time the view paints
function_s(rack.getSlot(1, 1, 1).as(treenode), "paintLabel", labelName);

for (int i = 1; i &amp;lt;= rack.bays.length; i++) {
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Storage.Bay bay = rack.bays&lt;I&gt;;
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;for (int j = 1; j &amp;lt;= bay.levels.length; j++) {&lt;!-- --&gt;&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Storage.Level level = bay.levels&lt;J&gt;;
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;for (int k = 1; k &amp;lt;= level.slots.length; k++) {&lt;!-- --&gt;&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;treenode slotNode = &amp;nbsp;level.slots&lt;K&gt;.as(treenode);&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;slotNode.find("slotLabels")?.find(labelName)?.destroy();
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;slotNode.find("resetLabels")?.find(labelName)?.destroy();&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;}
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;}
}&lt;/K&gt;&lt;/J&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 30 Aug 2022 17:39:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/storage-slot-label-painter-not-auto-updating-after-label-node/m-p/13558540#M61576</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2022-08-30T17:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Storage Slot Label Painter Not Auto Updating After Label Node Removal</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/storage-slot-label-painter-not-auto-updating-after-label-node/m-p/13558541#M61577</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Thanks. That worked great! And thanks for the much more concise code. I forgot about using '?'. - Stan
&lt;/DIV&gt;</description>
      <pubDate>Tue, 30 Aug 2022 19:22:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/storage-slot-label-painter-not-auto-updating-after-label-node/m-p/13558541#M61577</guid>
      <dc:creator>stan_e_davis</dc:creator>
      <dc:date>2022-08-30T19:22:29Z</dc:date>
    </item>
  </channel>
</rss>

