<?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: AutoCad Command Line Using Dynamo in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8850300#M89032</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4071757"&gt;@rvtquestions&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm not really sure if I understand your question correctly but I'll try my luck and&amp;nbsp; ask why not to use Autocad macros functions and scripting? There is also a macro recorder where you can create a "chains" of your commands.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2019 17:04:22 GMT</pubDate>
    <dc:creator>Yonas89</dc:creator>
    <dc:date>2019-06-13T17:04:22Z</dc:date>
    <item>
      <title>AutoCad Command Line Using Dynamo</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8769906#M89030</link>
      <description>&lt;P&gt;This post is related to an earlier discussion started by &amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1857219"&gt;@Yonas89&lt;/a&gt; with a fruitful response by @Anonymous&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/integrate-dynamo-with-autocad/td-p/6674248" target="_blank"&gt;https://forums.autodesk.com/t5/net/integrate-dynamo-with-autocad/td-p/6674248&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, my question is if there is a way to call the commandline in AutoCad by using Dynamo? Or is it only accessible to certain methods like .AddLine()?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if we had a string input of a list of commands in dynamo:&lt;/P&gt;
&lt;P&gt;where IN[0] would receive something like ["-zoom", "extents", "-ai_selall"], can that be summoned into AutoCad? And going further, can we call up a list of lisps to run?&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 16:32:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8769906#M89030</guid>
      <dc:creator>rvtquestions</dc:creator>
      <dc:date>2019-05-03T16:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCad Command Line Using Dynamo</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8770632#M89031</link>
      <description>&lt;P&gt;The link refers to roundabouts and intersections, better of looking at Transoft roundabout design it takes into account the type of vehicle travelling through.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why not work in lisp etc so much help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have some nice stuff for CIV3D like change surface display via tool bar, change point angle by pick. Personally hate the toolspace having to go there to change a display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2019 01:02:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8770632#M89031</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-05-04T01:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCad Command Line Using Dynamo</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8850300#M89032</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4071757"&gt;@rvtquestions&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm not really sure if I understand your question correctly but I'll try my luck and&amp;nbsp; ask why not to use Autocad macros functions and scripting? There is also a macro recorder where you can create a "chains" of your commands.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 17:04:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8850300#M89032</guid>
      <dc:creator>Yonas89</dc:creator>
      <dc:date>2019-06-13T17:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCad Command Line Using Dynamo</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8880418#M89033</link>
      <description>&lt;P&gt;Ultimately, I am trying to understand the extents of how&amp;nbsp;the referenced example works. I'm trying to understand if my request is possible or if this Dynamo to Autocad feature is limited to specific commands like drawing&amp;nbsp;a line. My question is basically asking if we could literally send text&amp;nbsp;into an Autocad CommandLine via Dynamo.&amp;nbsp;&amp;nbsp;So if I had a list of strings [] ["z" "e" …] etc. it would&amp;nbsp;input those into the command line and run.&amp;nbsp;While I understand there are macros, scripts, lisps, etc. I am asking because there is something interesting/powerful to be able to automate tasks in AutoCad&amp;nbsp;along with other parts that I am processing in Dynamo. More specifically, the initial question arose from&amp;nbsp;the fact&amp;nbsp;that I ran into Batch script issues that failed on me. I used Batch scripts and scriptpro type software before but there have been instances when something goes wrong and ultimately leaves it useless. Therefore, I am curious to know if I could workaround it by inputting commands via Dynamo.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 22:20:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8880418#M89033</guid>
      <dc:creator>rvtquestions</dc:creator>
      <dc:date>2019-06-28T22:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCad Command Line Using Dynamo</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8880658#M89034</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4071757"&gt;@rvtquestions&lt;/a&gt;that's a very interesting approach actually. Good stuff to think about all the possibilities.&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what I know so far, AutoCAD could be accessed&amp;nbsp; from Dynamo through the old fashion COM API only, which I think is very underestimated these days, cause you can access almost every software you have on your windows. Still not sure if you were looking for this, but this simple script sends the "Hello world" command to AutoCAD.&lt;/P&gt;&lt;PRE&gt;import clr
clr.AddReference('ProtoGeometry')
import Autodesk
from Autodesk.DesignScript.Geometry import *
import System
from System import *

o = "no"
c = IN[0]
if len(c) != 0:
	app = System.Runtime.InteropServices.Marshal.GetActiveObject("Autocad.Application")
	AcDoc = app.ActiveDocument
	AcDB = AcDoc.Database
	AcDoc.SendCommand(c)
	o ="ok"
#Assign your output to the OUT variable.
OUT = o&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HelloWorld.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/652411i5113F9EE4D75FC4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="HelloWorld.PNG" alt="HelloWorld.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jun 2019 08:47:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/8880658#M89034</guid>
      <dc:creator>Yonas89</dc:creator>
      <dc:date>2019-06-29T08:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCad Command Line Using Dynamo</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/9067239#M89035</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1857219"&gt;@Yonas89&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hey Yonas,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;excuse my late reply as I put this on the side but exploring it again now. Thank you for your contribution! While simple, it certainly is an interesting step forward. Replicating your test using Manual Mode, I am able to send whatever text to the Autocad Command Line, however it does complete the command (the text just sits in the command line). Ultimately, it seems to be missing something to replicate the "Enter" key. Even when I send the command "" or " ", it doesn't register. I have a few questions for you:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Where did you find out about these methods such as SendCommand()? Is that part of a Dynamo API or AutoCad API?&lt;/LI&gt;&lt;LI&gt;It seems to finish my initial request all we would need know is how to:&lt;UL&gt;&lt;LI&gt;Finish a sent command/simulate the enter key&lt;/LI&gt;&lt;LI&gt;Wait for the command to finish&lt;/LI&gt;&lt;LI&gt;For loop this whole process, for each string x in IN[0]....SendCommand(x)...enter...next&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 04 Oct 2019 13:41:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/9067239#M89035</guid>
      <dc:creator>rvtquestions</dc:creator>
      <dc:date>2019-10-04T13:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCad Command Line Using Dynamo</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/9070944#M89036</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4071757"&gt;@rvtquestions&lt;/a&gt;, please leave space after each text as in my example (If you take a closer look I wrote "HelloWord " and not "HelloWord"). Blank space in string = enter in autocad command line.&amp;nbsp; These rules comes from AutoCAD scripting principles. Here's short intro about it:&amp;nbsp;&lt;A href="https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/AutoCAD-Customization/files/GUID-95BB6824-0700-4019-9672-E6B502659E9E-htm.html" target="_blank" rel="noopener"&gt;https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/AutoCAD-Customization/files/GUID-95BB6824-0700-4019-9672-E6B502659E9E-htm.html&lt;/A&gt;. So I believe with Dynamo you can extend this scripts by implementing logic and analysis in the middle of your script and make reactions based on the results you get in between. Other way, you don't need dynamo for simple scripting.&lt;/P&gt;&lt;P&gt;AutoCAD has many API's but the only one allows to manage AutoCAD from "outside" and manage the objects not from the drawing. This api is called&amp;nbsp; COM API. For documentation look here for all the methods and properties:&amp;nbsp;&lt;A href="http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-A809CD71-4655-44E2-B674-1FE200B9FE30" target="_blank" rel="noopener"&gt;http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-A809CD71-4655-44E2-B674-1FE200B9FE30&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Click on the "Document" in the chart and you will see "SendCommand" method.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 13:12:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-command-line-using-dynamo/m-p/9070944#M89036</guid>
      <dc:creator>Yonas89</dc:creator>
      <dc:date>2019-10-07T13:12:39Z</dc:date>
    </item>
  </channel>
</rss>

