<?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 to get the name of time table assigned to a resource? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-the-name-of-time-table-assigned-to-a-resource/m-p/13491322#M8783</link>
    <description>&lt;P&gt;&lt;I&gt;[ FlexSim 17.0.12 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;In my model,I have assigned only one time table to a each resource.&lt;/P&gt;
&lt;P&gt;I am trying to prepare a simple GUI which helps the users to change shift of the resources. For setting current item of the combo box when the GUI is open I am trying to read the shift assigned to perticular object but i could not able to get the value of the timetable node. Below is the code snippet I have written for this purpose. &lt;A rel="user" href="https://answers.flexsim.com/users/9/benjaminwilson.html" nodeid="9"&gt;@Ben Wilson&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/87/matthew.g.html" nodeid="87"&gt;@Matthew Gillespie&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/203/brenton.k.html" nodeid="203"&gt;@Brenton King&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/437/arun.k.html" nodeid="437"&gt;@Arun KR&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/11/jacob.g.html" nodeid="11"&gt;@Jacob Gillespie&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Please let me know how to get the time table assigned to a object.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="10517-capture.jpg"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1496609iCFA2CB8331B09C50/image-size/large?v=v2&amp;amp;px=999" role="button" title="10517-capture.jpg" alt="10517-capture.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;treenode timetablenode = mem.find("&amp;gt;variables/timetables");
treenode timetable = timetablenode.subnodes[1];
string text = timetable.value; //this line code is coming as null
Array Str = text.split("&amp;gt;");
string text1 = Str[1];
Array Str1 = text1.split("/");
String timetableName = Str1[3];
		
&lt;/PRE&gt;</description>
    <pubDate>Mon, 22 Jan 2018 14:14:12 GMT</pubDate>
    <dc:creator>asb_praneeth</dc:creator>
    <dc:date>2018-01-22T14:14:12Z</dc:date>
    <item>
      <title>How to get the name of time table assigned to a resource?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-the-name-of-time-table-assigned-to-a-resource/m-p/13491322#M8783</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 17.0.12 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;In my model,I have assigned only one time table to a each resource.&lt;/P&gt;
&lt;P&gt;I am trying to prepare a simple GUI which helps the users to change shift of the resources. For setting current item of the combo box when the GUI is open I am trying to read the shift assigned to perticular object but i could not able to get the value of the timetable node. Below is the code snippet I have written for this purpose. &lt;A rel="user" href="https://answers.flexsim.com/users/9/benjaminwilson.html" nodeid="9"&gt;@Ben Wilson&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/87/matthew.g.html" nodeid="87"&gt;@Matthew Gillespie&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/203/brenton.k.html" nodeid="203"&gt;@Brenton King&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/437/arun.k.html" nodeid="437"&gt;@Arun KR&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/11/jacob.g.html" nodeid="11"&gt;@Jacob Gillespie&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Please let me know how to get the time table assigned to a object.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="10517-capture.jpg"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1496609iCFA2CB8331B09C50/image-size/large?v=v2&amp;amp;px=999" role="button" title="10517-capture.jpg" alt="10517-capture.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;treenode timetablenode = mem.find("&amp;gt;variables/timetables");
treenode timetable = timetablenode.subnodes[1];
string text = timetable.value; //this line code is coming as null
Array Str = text.split("&amp;gt;");
string text1 = Str[1];
Array Str1 = text1.split("/");
String timetableName = Str1[3];
		
&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jan 2018 14:14:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-the-name-of-time-table-assigned-to-a-resource/m-p/13491322#M8783</guid>
      <dc:creator>asb_praneeth</dc:creator>
      <dc:date>2018-01-22T14:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of time table assigned to a resource?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-the-name-of-time-table-assigned-to-a-resource/m-p/13491323#M8784</link>
      <description>&lt;P&gt;The subnodes under the timetables variable have coupling data, not string data. The .value property on a node with coupling data will return the node it's point at. However, this node is a node inside the members variable on the timetable. You then need to use the ownerobject command to get the actual timetable node.&lt;/P&gt;&lt;PRE&gt;treenode timetableVar = getvarnode(mem, "timetables");
treenode varSubnode = timetablenode.subnodes[1];
treenode timetableSubnode = timetable.value;
treenode timetable = ownerobject(timetableSubnode);
string name = timetable.name;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jan 2018 16:10:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-the-name-of-time-table-assigned-to-a-resource/m-p/13491323#M8784</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2018-01-22T16:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of time table assigned to a resource?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-the-name-of-time-table-assigned-to-a-resource/m-p/13491324#M8785</link>
      <description>&lt;P&gt;It's a bit simpler than that &lt;A rel="user" href="https://answers.flexsim.com/users/437/arun.k.html" nodeid="437"&gt;@Arun KR&lt;/A&gt;, you don't need to do all the extra getting of the path/string manipulation.&lt;/P&gt;&lt;PRE&gt;treenode tableNode = model().find("Processor1&amp;gt;variables/timetables/1").value;
string tableName = ownerobject(tableNode).name;&lt;/PRE&gt;&lt;P&gt;The /1 at the end of the find() command gets the first subnode of the timetables variable (regardless of the name).&lt;/P&gt;&lt;P&gt;Since the object is coupled to a subnode of the Time Table, you can get the ownerobject of that subnode (the Time Table) using the ownerobject() command. &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 16:11:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-the-name-of-time-table-assigned-to-a-resource/m-p/13491324#M8785</guid>
      <dc:creator>matt_long</dc:creator>
      <dc:date>2018-01-22T16:11:42Z</dc:date>
    </item>
  </channel>
</rss>

