<?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 Is it possible to set dipatcher's central ports in flexscript? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-dipatcher-s-central-ports-in-flexscript/m-p/13612292#M95872</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m currently working with a Dispatcher object in FlexSim, and I’d like to programmatically set the Central Ports Type (Source or Sink) using FlexScript.&lt;/P&gt;&lt;P&gt;I’ve tried accessing the variable or attribute through the variables and parameters nodes in the tree, but couldn’t find a node or label corresponding to the central port type. I also attempted using setvarnum() or setnodenum(), but it seems that the central port type is not exposed as a regular node property.&lt;/P&gt;&lt;P&gt;Is there a FlexScript command or method to set the Dispatcher's central ports type at runtime? Or is this only configurable via the GUI?&lt;/P&gt;&lt;P&gt;Thanks in advance for any insights!&lt;/P&gt;</description>
    <pubDate>Sat, 03 May 2025 16:39:00 GMT</pubDate>
    <dc:creator>danielhsu2014</dc:creator>
    <dc:date>2025-05-03T16:39:00Z</dc:date>
    <item>
      <title>Is it possible to set dipatcher's central ports in flexscript?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-dipatcher-s-central-ports-in-flexscript/m-p/13612292#M95872</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m currently working with a Dispatcher object in FlexSim, and I’d like to programmatically set the Central Ports Type (Source or Sink) using FlexScript.&lt;/P&gt;&lt;P&gt;I’ve tried accessing the variable or attribute through the variables and parameters nodes in the tree, but couldn’t find a node or label corresponding to the central port type. I also attempted using setvarnum() or setnodenum(), but it seems that the central port type is not exposed as a regular node property.&lt;/P&gt;&lt;P&gt;Is there a FlexScript command or method to set the Dispatcher's central ports type at runtime? Or is this only configurable via the GUI?&lt;/P&gt;&lt;P&gt;Thanks in advance for any insights!&lt;/P&gt;</description>
      <pubDate>Sat, 03 May 2025 16:39:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-dipatcher-s-central-ports-in-flexscript/m-p/13612292#M95872</guid>
      <dc:creator>danielhsu2014</dc:creator>
      <dc:date>2025-05-03T16:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to set dipatcher's central ports in flexscript?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-dipatcher-s-central-ports-in-flexscript/m-p/13612995#M95873</link>
      <description>&lt;P&gt;Central port is a visual reference by a dawn line between two objects. Whenever you reference an object by centerobject connection, you can replace it directly by &lt;A href="https://docs.flexsim.com/en/25.1/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/treenode.html#Method-find" target="_blank" rel="noopener"&gt;FlexScript Class - treenode&lt;/A&gt;&amp;nbsp;find method reference.&amp;nbsp;&lt;BR /&gt;Alternatively you can dynamically draw a centerport connection by command &lt;A href="https://docs.flexsim.com/en/25.1/Reference/CodingInFlexSim/CommandReference/Commands.html#contextdragconnection" target="_blank" rel="noopener"&gt;contextdragconnection&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 May 2025 13:34:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-dipatcher-s-central-ports-in-flexscript/m-p/13612995#M95873</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2025-05-04T13:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to set dipatcher's central ports in flexscript?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-dipatcher-s-central-ports-in-flexscript/m-p/13613074#M95875</link>
      <description>&lt;P&gt;Thanks a lot. But now I am trying to set dispatcher's Pass To into shortest distance by flexscript like:&lt;/P&gt;&lt;P&gt;Object dispatcher = Model.find(objName);&lt;BR /&gt;dispatcher.setProperty("PassTo","Shortest Distance");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielhsu2014_3-1746371502828.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1530034i37B33DC1FF8F3B12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="danielhsu2014_3-1746371502828.png" alt="danielhsu2014_3-1746371502828.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;,but it dosen't work it. How can I make it work? thanks for helping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 May 2025 15:12:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-dipatcher-s-central-ports-in-flexscript/m-p/13613074#M95875</guid>
      <dc:creator>danielhsu2014</dc:creator>
      <dc:date>2025-05-04T15:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to set dipatcher's central ports in flexscript?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-dipatcher-s-central-ports-in-flexscript/m-p/13614500#M95907</link>
      <description>&lt;P&gt;it is not just a string it is a treenode source code that gets evaluated to return directly an output port reference to transfer a tasksequence to attached object. Setproperty has only inserted a string and has not copied the source code into the node. I am not aware of a mechanism to copy a template source code called by phrase like "shortest distance" into the passTo node instantly executable. The picklist source code is in this node VIEW:/picklists/passtopicklist/Shortest Distance. But I wasn't successfull to get this code to work during simulation run. I needed always a reset of this model.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Object dispatcher = Model.find("Dispatcher1"); 
treenode passto = dispatcher.attrs.variables.subnodes["passto"];
passto.value = "";// delete currently active source code
passto.value += "TaskSequence taskSequence = param(1); Dispatcher current = ownerobject(c);";// insert header
passto.value += views.find("/picklists/passtopicklist/Shortest Distance").value;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 12:31:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-dipatcher-s-central-ports-in-flexscript/m-p/13614500#M95907</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2025-05-06T12:31:00Z</dc:date>
    </item>
  </channel>
</rss>

