<?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 create a command with parameter in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7172579#M8040</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;I want transmit a outside parameter to CAD, my thinking is like following :&lt;/P&gt;&lt;P&gt;//outside code&lt;/P&gt;&lt;P&gt;class xxxxx&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;//outside code&lt;/P&gt;&lt;P&gt;string parameter="ParameterToTransmit";&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;document acdoc.SendCommand("MyCommand ",&lt;STRONG&gt;ParameterToTransmit&lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//CAD command&lt;/P&gt;&lt;P&gt;&amp;nbsp;[CommandMethod("MyCommand ")]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void MyCommand (&lt;STRONG&gt;ParameterToTransmit&lt;/STRONG&gt;)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;But i don't know how to make a command with parameter&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Is&amp;nbsp; it possible to create a command with parameter ?&lt;/P&gt;&lt;P&gt;Or is&amp;nbsp; it have other solution?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2017 00:07:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-23T00:07:32Z</dc:date>
    <item>
      <title>create a command with parameter</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7172579#M8040</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;I want transmit a outside parameter to CAD, my thinking is like following :&lt;/P&gt;&lt;P&gt;//outside code&lt;/P&gt;&lt;P&gt;class xxxxx&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;//outside code&lt;/P&gt;&lt;P&gt;string parameter="ParameterToTransmit";&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;document acdoc.SendCommand("MyCommand ",&lt;STRONG&gt;ParameterToTransmit&lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//CAD command&lt;/P&gt;&lt;P&gt;&amp;nbsp;[CommandMethod("MyCommand ")]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void MyCommand (&lt;STRONG&gt;ParameterToTransmit&lt;/STRONG&gt;)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;But i don't know how to make a command with parameter&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Is&amp;nbsp; it possible to create a command with parameter ?&lt;/P&gt;&lt;P&gt;Or is&amp;nbsp; it have other solution?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 00:07:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7172579#M8040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-23T00:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: create a command with parameter</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7207717#M8041</link>
      <description>&lt;P&gt;Pl refer following posts:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;usage of Lisp Function&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/net/custom-command-parameters-in-net/td-p/2859030" target="_blank"&gt;https://forums.autodesk.com/t5/net/custom-command-parameters-in-net/td-p/2859030&lt;/A&gt;&lt;BR /&gt;usage of CommandMethod&lt;BR /&gt;&lt;A href="http://adndevblog.typepad.com/autocad/2012/07/create-command-with-parameters.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2012/07/create-command-with-parameters.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 05:56:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7207717#M8041</guid>
      <dc:creator>moogalm</dc:creator>
      <dc:date>2017-07-06T05:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: create a command with parameter</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7227418#M8042</link>
      <description>&lt;P&gt;Dear Sir:&lt;/P&gt;&lt;P&gt;I can't open your link, and i got a solution in net forums, but thank you very much also.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/make-a-command-with-parameter/m-p/7179108#M53965" target="_self"&gt;https://forums.autodesk.com/t5/net/make-a-command-with-parameter/m-p/7179108#M53965&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 01:30:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7227418#M8042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-14T01:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: create a command with parameter</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7241413#M8043</link>
      <description>&lt;P&gt;If you create a new ARX with the ObjectARX-Wizard, it will contain a lisp command called "MyLispFunction".&lt;/P&gt;
&lt;P&gt;You find the implementation in acrxEntryPoint.cpp:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;	static int ads_MyLispFunction () {
		struct resbuf *args =acedGetArgs () ;		
		// Put your command code here
		acutRelRb (args) ;
		
		// Return a value to the AutoCAD Lisp Interpreter
		// acedRetNil, acedRetT, acedRetVoid, acedRetInt, acedRetReal, acedRetStr, acedRetPoint, acedRetName, acedRetList, acedRetVal

		return (RTNORM) ;
	}
&lt;/PRE&gt;
&lt;P&gt;If you enter this command in AutoCAD: &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt; (mylispfunction "abc" 10 3.141 123456789)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;args&lt;/FONT&gt; will be a resbuf list with the four arguments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A different approach could be to implement a "normal" command that calls &lt;FONT face="courier new,courier"&gt;acedGetString(TRUE,NULL,argline)&lt;/FONT&gt; to retrieve arguments from the commandline. Than you have to parse &lt;FONT face="courier new,courier"&gt;argline&lt;/FONT&gt; yourself.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 10:16:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7241413#M8043</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2017-07-20T10:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: create a command with parameter</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7248209#M8044</link>
      <description>&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 02:09:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-a-command-with-parameter/m-p/7248209#M8044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-24T02:09:29Z</dc:date>
    </item>
  </channel>
</rss>

