<?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: how to use user command in DLL in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562244#M64477</link>
    <description>&lt;P&gt;Note that you can actually look inside the FlexSim headers from your Visual Studio project. If you 
	&lt;SPAN class="code"&gt;#include "FlexsimDefs.h"&lt;/SPAN&gt; it will eventually include &lt;SPAN class="code"&gt;allobjects.h&lt;/SPAN&gt; which defines the TASK_... constants and more.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jan 2017 10:18:41 GMT</pubDate>
    <dc:creator>mischa_spelt</dc:creator>
    <dc:date>2017-01-11T10:18:41Z</dc:date>
    <item>
      <title>how to use user command in DLL</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562239#M64472</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Image.html"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1527347i5F579ECE890440AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image.html" alt="Image.html" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;"rotate" is a user command,how can i use it in DLL&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 08:26:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562239#M64472</guid>
      <dc:creator>qiu_xiaohong</dc:creator>
      <dc:date>2017-01-09T08:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to use user command in DLL</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562240#M64473</link>
      <description>&lt;P&gt;
	User commands are stored in the tree under MODEL:/Tools/UserCommands/rotate. Their code is stored in the first subnode which is usually called "code". &lt;span class="lia-inline-image-display-wrapper" image-alt="4508-usercommandintree.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494765iD12E5EC9BE5E7E54/image-size/large?v=v2&amp;amp;px=999" role="button" title="4508-usercommandintree.png" alt="4508-usercommandintree.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can use the &lt;SPAN class="code"&gt;nodefu&lt;/SPAN&gt;&lt;SPAN class="code" style="background-color: initial;"&gt;nction&lt;/SPAN&gt; command like you would normally to execute the user command, from the DLL:&lt;/P&gt;&lt;PRE&gt;treeonde rotateCommand = first(node("MODEL:/Tools/UserCommands/rotate"));
double result = nodefunction(rotateCommand, robot, Rot, order_number, table_name1);&lt;/PRE&gt;&lt;P&gt;Note, however, that this makes your DLL non-reusable by another model, unless that model also happens to have the same user command. &lt;/P&gt;&lt;P&gt;You may want to consider implementing the &lt;EM&gt;rotate&lt;/EM&gt; functionality in the DLL instead:&lt;/P&gt;&lt;PRE&gt;visible double rotate(FLEXSIMINTERFACE) {
  // ...
}&lt;/PRE&gt;&lt;P&gt; and then linking the user command to the DLL function, as described in the Module SDK documentation:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="4509-dllnode.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494763iAA7E99ABCED126CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="4509-dllnode.png" alt="4509-dllnode.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 09:00:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562240#M64473</guid>
      <dc:creator>mischa_spelt</dc:creator>
      <dc:date>2017-01-09T09:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to use user command in DLL</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562241#M64474</link>
      <description>&lt;P&gt;Question for &lt;A rel="user" href="https://answers.flexsim.com/users/207/anthony.j.html" nodeid="207"&gt;@anthony.johnson&lt;/A&gt;: does it matter whether you call nodefunction(x, ...) or x-&amp;gt;evaluate(...) in this case? &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 14:49:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562241#M64474</guid>
      <dc:creator>mischa_spelt</dc:creator>
      <dc:date>2017-01-09T14:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to use user command in DLL</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562242#M64475</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Thank you for your reply, I can use user command in DLL. But I also want to know if “&lt;/STRONG&gt;TASKTYPE_STARTANIMATION&lt;STRONG&gt;” can use in DLL?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 01:05:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562242#M64475</guid>
      <dc:creator>qiu_xiaohong</dc:creator>
      <dc:date>2017-01-11T01:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to use user command in DLL</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562243#M64476</link>
      <description>&lt;P&gt;Why don't you just try it? Basically this is just a macro so just look for it or try typing and intellisense will tell you if it exists or not.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 09:03:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562243#M64476</guid>
      <dc:creator>SCHamoen</dc:creator>
      <dc:date>2017-01-11T09:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to use user command in DLL</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562244#M64477</link>
      <description>&lt;P&gt;Note that you can actually look inside the FlexSim headers from your Visual Studio project. If you 
	&lt;SPAN class="code"&gt;#include "FlexsimDefs.h"&lt;/SPAN&gt; it will eventually include &lt;SPAN class="code"&gt;allobjects.h&lt;/SPAN&gt; which defines the TASK_... constants and more.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 10:18:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-use-user-command-in-dll/m-p/13562244#M64477</guid>
      <dc:creator>mischa_spelt</dc:creator>
      <dc:date>2017-01-11T10:18:41Z</dc:date>
    </item>
  </channel>
</rss>

