<?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 : Run command in AutoCAD OEM from external VB.NET program in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609263#M34290</link>
    <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;looks like it is the string concatenation, just grabbed this line from some of my old code in c#:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;link.Arguments = @"/b " + "\"" + Application.StartupPath + @"\someScript.scr" + "\"";&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;hth.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Oct 2016 20:37:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-10-07T20:37:56Z</dc:date>
    <item>
      <title>Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608380#M34281</link>
      <description>&lt;P&gt;I have an AutoCAD OEM product named "BugCAD", and a standalone VB.NET application named BugWin.&amp;nbsp; From BugWin,&amp;nbsp; I need to be able to open BugCAD, and run a command named "Callform" that is already NETLOADed.&amp;nbsp; The code below seems to be very close, but just can't quite do the job.&amp;nbsp; It opens the program fine, and tries to run the command, but thinks it's a script file that it can't find.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would be a very powerful feature for both programs to interact like this.&amp;nbsp; Would appreciate any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    Private Sub BugCADToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles BugCADToolStripMenuItem.Click

        ' New ProcessStartInfo created
        Dim p As New ProcessStartInfo

        p.FileName = "C:\Program Files\Autodesk\AutoCAD OEM 2014\oem\BugCAD\bugcad.exe"

        ' Use these arguments for the process
        p.Arguments = "/b command callform"

        ' Use a hidden window
        p.WindowStyle = ProcessWindowStyle.Normal

        ' Start the process
        Process.Start(p)
    End Sub&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Oct 2016 14:57:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608380#M34281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T14:57:32Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608715#M34282</link>
      <description>&lt;P&gt;After the /b switch, you need to pass the path of a script file (.scr extension). Just create a text file with a .scr extension, put your callform command in it and change the arguments of&amp;nbsp;bugcad.exe.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 16:50:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608715#M34282</guid>
      <dc:creator>FRFR1426</dc:creator>
      <dc:date>2016-10-07T16:50:33Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608808#M34283</link>
      <description>&lt;P&gt;Thank you for your quick response Maxence.&amp;nbsp; I still get two messages:&lt;/P&gt;&lt;P&gt;"Can't find specified drawing file.&amp;nbsp; Pls verify it exsists."&amp;nbsp; &amp;amp; "Program.scr" Can't find file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my new line of code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' Use these arguments for the process&lt;BR /&gt;p.Arguments = "/b C:\Program Files\Autodesk\AutoCAD OEM 2014\oem\BugCAD\Support\callform.scr"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this the format and/or proper text that I should use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did create a text file named "callform.scr" and put it into the \Support folder in the appropriate path.&amp;nbsp; Inside the file is a line of text "callform".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel like it's very close to a solution!&lt;/P&gt;&lt;P&gt;thanks again!&lt;/P&gt;&lt;P&gt;mitch&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 17:28:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608808#M34283</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T17:28:18Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608934#M34284</link>
      <description>&lt;P&gt;Your script path contains spaces, you have to put it between double quotes.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 18:14:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608934#M34284</guid>
      <dc:creator>FRFR1426</dc:creator>
      <dc:date>2016-10-07T18:14:17Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608978#M34285</link>
      <description>It already is in double quotes, isn't it? Can you show me exactly how the line should look? thanks!</description>
      <pubDate>Fri, 07 Oct 2016 18:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608978#M34285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T18:33:15Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608985#M34286</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;p.Arguments = &lt;/SPAN&gt;"/b ""C:\Program Files\Autodesk\AutoCAD OEM 2014\oem\BugCAD\Support\callform.scr"""&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Oct 2016 18:36:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6608985#M34286</guid>
      <dc:creator>FRFR1426</dc:creator>
      <dc:date>2016-10-07T18:36:34Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609004#M34287</link>
      <description>Getting closer... just one error message now... "callform.scr" can't find file.&lt;BR /&gt;&lt;BR /&gt;Maybe this is an OEM problem? The path in the code is the Support folder uncer where the bugcad.exe file is located... that's the right place isn't it?&lt;BR /&gt;&lt;BR /&gt;Thanks so much for your patience and help.&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Oct 2016 18:47:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609004#M34287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T18:47:05Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609054#M34288</link>
      <description>Does the command "callform" inside the text file 'callform.scr' need to be in quotes?</description>
      <pubDate>Fri, 07 Oct 2016 19:10:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609054#M34288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T19:10:47Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609098#M34289</link>
      <description>&lt;P&gt;I decided try to do a similare procedure in plain AutoCAD (vs OEM), and just draw a box.&amp;nbsp; This does not give an error message, but doesn't do anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the folder 'C:\Program Files\Autodesk\AutoCAD 2014\Support', I have a text file named 'drawline.scr'.&amp;nbsp; In that file, i have the line: "LINE" "0,0,0" "1,0,0" "1,1,0" "0,1,0" "C".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did that inside of a .lsp file, and it worked, but not in this situation using a .scr file.&amp;nbsp; Here's the code, why doesn't this work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    Private Sub BugCADToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles BugCADToolStripMenuItem.Click

        ' New ProcessStartInfo created
        Dim p As New ProcessStartInfo

        p.FileName = "C:\Program Files\Autodesk\AutoCAD 2014\acad.exe"

        ' Use these arguments for the process
        p.Arguments = "/b ""C:\Program Files\Autodesk\AutoCAD 2014\Support\drawline.scr"""

        ' Use a hidden window
        p.WindowStyle = ProcessWindowStyle.Normal

        ' Start the process
        Process.Start(p)
    End Sub&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Oct 2016 19:26:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609098#M34289</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T19:26:12Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609263#M34290</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;looks like it is the string concatenation, just grabbed this line from some of my old code in c#:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;link.Arguments = @"/b " + "\"" + Application.StartupPath + @"\someScript.scr" + "\"";&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;hth.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 20:37:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609263#M34290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T20:37:56Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609308#M34291</link>
      <description>I don't know how to convert C# to VB.net... I tried this, but doesn't work:&lt;BR /&gt;p.Arguments = "/b " &amp;amp; "C:\Program Files\Autodesk\AutoCAD OEM 2014\oem\BugCAD\Support" &amp;amp; "\callform.scr"""&lt;BR /&gt;&lt;BR /&gt;thanks.</description>
      <pubDate>Fri, 07 Oct 2016 20:58:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609308#M34291</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T20:58:49Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609330#M34292</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;this is a handy place to convert code vb.net to c# or vice-versa:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;A href="http://converter.telerik.com/" target="_blank"&gt;http://converter.telerik.com/&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;hth.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 21:07:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609330#M34292</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T21:07:30Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609339#M34293</link>
      <description>cool, thanks!</description>
      <pubDate>Fri, 07 Oct 2016 21:11:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609339#M34293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T21:11:55Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609347#M34294</link>
      <description>Aww... used the converter suggested by LE3, still "can't find file".&lt;BR /&gt;&lt;BR /&gt;How frustrating... so close but so far... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;</description>
      <pubDate>Fri, 07 Oct 2016 21:15:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6609347#M34294</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T21:15:07Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6610466#M34295</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;have been many years that i used a script, but after re-reading and seeing what you posted:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;gt;&amp;nbsp;"LINE" "0,0,0" "1,0,0" "1,1,0" "0,1,0" "C"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;you do not have the "-" in your script line no?, if you do, just remove all of them, and try again.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;leave a line like:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LINE 0,0,0 1,0,0 1,1,0 0,1,0 C&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;hth&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;luis.-&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Oct 2016 01:37:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6610466#M34295</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-09T01:37:44Z</dc:date>
    </item>
    <item>
      <title>Re : Run command in AutoCAD OEM from external VB.NET program</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6611369#M34296</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works!&amp;nbsp; Here's the final code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;        ' New ProcessStartInfo created
        Dim p As New ProcessStartInfo

        p.FileName = "C:\Program Files\Autodesk\AutoCAD OEM 2014\oem\BugCAD\bugcad.exe"

        'BugCAD.scr  contains only the word Callform
        p.Arguments = "/b " + """" + "C:\Program Files\Autodesk\AutoCAD OEM 2014\oem\BugCAD\Support\bugcad.scr" + """"

        ' Use a hidden window
        p.WindowStyle = ProcessWindowStyle.Normal

        ' Start the process
        Process.Start(p)
    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script file in the Support folder contained only the command Callform, which runs my program inside of BugCAD (AutoCAD OEM).&amp;nbsp; Several different folks contributed to the solution.&amp;nbsp; I could never have figured this out on my own, despite lots of searching.&amp;nbsp; Thanks so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 00:58:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-in-autocad-oem-from-external-vb-net-program/m-p/6611369#M34296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-10T00:58:14Z</dc:date>
    </item>
  </channel>
</rss>

