<?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 : Acoreconsole with [LispFunction(&amp;lt;commandname&amp;gt;)] in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876638#M32770</link>
    <description>&lt;P&gt;In your script file, you may not use double anti-slashes and since AutoCAD 2014 the C:\IFP20 folder have to be added to trusted paths.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NETLOAD
C:\IFP20\IFP20.dll
(MakeCircle '(0 0) 20)
_.qsave&lt;BR /&gt;
&lt;/PRE&gt;
&lt;P&gt;You should first test the script directly from an AutoCAD session using the SCRIPT command.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2017 13:32:44 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2017-02-14T13:32:44Z</dc:date>
    <item>
      <title>Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6875797#M32763</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can use &lt;STRONG&gt;[LispFunction(&amp;lt;commandname&amp;gt;)]&lt;/STRONG&gt;&amp;nbsp;created in .NET dll with Accorconsole.exe to run in multiple threads. What should I write in the script file to execute this custom command. Examples given at all places is of&amp;nbsp;&lt;STRONG&gt;[CommandMethod("&amp;lt;commandname&amp;gt;")]&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used LispFunction because I want to send some command line parameters to the function. Please see below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[LispFunction("&amp;lt;commandname&amp;gt;")]&lt;BR /&gt;public static void batchprog(ResultBuffer Args)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;..........&lt;/P&gt;&lt;P&gt;..........&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can use this in the script file for accoreconsole.exe calling. Ofcourse, parameters will be dynamic. Do I need to create .scr file on the fly(dynamic) or please suggest alternative.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 05:11:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6875797#M32763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-14T05:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6875880#M32764</link>
      <description>&lt;P&gt;Short answer, you can't and your wasting your time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the HOB guys (Skylar) has just about stretched the core console to all its possible limits. We even did a test loading every dbx, crx and dll packaged with AutoCAD trying to unlock additional functionality.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only good new I can give you is that "some" of the VL functions do work in core console and dbx's can be loaded to partially&amp;nbsp;support 3rd party objects, but absolutely no VLA, ActiveX, Arx or .Net.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: Arx was not extensively tested, but I know the Autodesk Fabrication one definitively doesn't work.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 07:11:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6875880#M32764</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-14T07:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876080#M32765</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks for the reply. But [CommandMethod("&amp;lt;commandname&amp;gt;")] works perfectly with accoreconsole.exe but&amp;nbsp;[LispFunction(&amp;lt;commandmethod&amp;gt;)] dont know how to do that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whether I need to create .scr file dynamically with passing arguments. Nobody there from Autodesk to answer??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 09:08:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876080#M32765</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-14T09:08:39Z</dc:date>
    </item>
    <item>
      <title>Re : Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876088#M32766</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I do not misunderstand what you're trying to do, I'd say you can run a script in the accoreconsole which calls a .NET LispFunction with parameters, but these parameters have to be hard coded in the script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A simple working example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;C# LispFunction&lt;/P&gt;
&lt;PRE&gt;using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Runtime;
using System;

namespace AcCoreConsoleLispFunction
{
    public class LispFunctions
    {
        [LispFunction("MakeCircle")]
        public object MakeCircle(ResultBuffer resbuf)
        {
            if (resbuf == null)
                return null;
            var args = resbuf.AsArray();
            if (args.Length != 2)
                return null;

            Point3d center;
            var arg = args[0];
            if (arg.TypeCode == (int)LispDataType.Point3d)
                center = (Point3d)arg.Value;
            else if (arg.TypeCode == (int)LispDataType.Point2d)
            {
                var pt = (Point2d)arg.Value;
                center = new Point3d(pt.X, pt.Y, 0.0);
            }
            else
                return null;

            double radius;
            arg = args[1];
            if (arg.TypeCode == (int)LispDataType.Double ||
                arg.TypeCode == (int)LispDataType.Int16 ||
                arg.TypeCode == (int)LispDataType.Int32)
                radius = Convert.ToDouble(arg.Value);
            else
                return null;

            var db = HostApplicationServices.WorkingDatabase;
            ObjectId id;
            using (var tr = db.TransactionManager.StartTransaction())
            {
                var ms = (BlockTableRecord)tr.GetObject(
                    SymbolUtilityServices.GetBlockModelSpaceId(db), OpenMode.ForWrite);
                var circle = new Circle(center, Vector3d.ZAxis, radius);
                id = ms.AppendEntity(circle);
                tr.AddNewlyCreatedDBObject(circle, true);
                tr.Commit();
            }
            return id;
        }
    }
}
&lt;/PRE&gt;
&lt;P&gt;script file:&lt;/P&gt;
&lt;PRE&gt;NETLOAD "AcCoreConsoleLispFunction.dll"
(MakeCircle '(0 0) 20)
_qsave&lt;BR /&gt;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 09:13:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876088#M32766</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-02-14T09:13:11Z</dc:date>
    </item>
    <item>
      <title>Re : Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876153#M32767</link>
      <description>&lt;P&gt;Thanks Gile. You got it exactly what I am trying to mention in the post. But parameters can not be hard coded unfortunately. Basically I am running accorconsole.exe in the batch which gets/read parameters from the predefined text file. Can you please guide how to achieve it. Do I need to create .scr file dynamically through the program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 09:39:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876153#M32767</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-14T09:39:36Z</dc:date>
    </item>
    <item>
      <title>Re : Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876199#M32768</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;pushpakp a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;Do I need to create .scr file dynamically through the program?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think so, but if you need to create a different script per dwg you'd lose the benefit of a batch processing with the accoreconsole...&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 10:02:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876199#M32768</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-02-14T10:02:31Z</dc:date>
    </item>
    <item>
      <title>Re : Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876294#M32769</link>
      <description>&lt;P&gt;I tried below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;string currentFile = @"C:\Temp\Drawing1.dwg";&lt;BR /&gt;String consoleOutput = String.Empty;&lt;BR /&gt;String entityBreakup = String.Empty;&lt;BR /&gt;using (Process coreprocess = new Process())&lt;BR /&gt;{&lt;BR /&gt;coreprocess.StartInfo.UseShellExecute = false;&lt;BR /&gt;coreprocess.StartInfo.CreateNoWindow = true;&lt;BR /&gt;coreprocess.StartInfo.RedirectStandardOutput = true;&lt;BR /&gt;coreprocess.StartInfo.FileName = @"C:\Program Files\Autodesk\AutoCAD 2016\accoreconsole.exe";&lt;/P&gt;&lt;P&gt;coreprocess.StartInfo.Arguments = string.Format("/i \"{0}\" /s \"{1}\" /l en-US", currentFile, @"C:\Temp\test.scr");&lt;/P&gt;&lt;P&gt;coreprocess.Start();&lt;/P&gt;&lt;P&gt;// Max wait for 5 seconds&lt;BR /&gt;coreprocess.WaitForExit(5000);&lt;/P&gt;&lt;P&gt;StreamReader outputStream&lt;BR /&gt;= coreprocess.StandardOutput;&lt;BR /&gt;consoleOutput = outputStream.ReadToEnd();&lt;BR /&gt;String cleaned =&lt;BR /&gt;consoleOutput.Replace("\0", string.Empty);&lt;/P&gt;&lt;P&gt;int first = cleaned.IndexOf("BreakupBegin") + "BreakupBegin".Length;&lt;BR /&gt;int last = cleaned.IndexOf("BreakupEnd");&lt;BR /&gt;if (first != -1 &amp;amp;&amp;amp; last != -1)&lt;BR /&gt;entityBreakup =&lt;BR /&gt;cleaned.Substring(first, last - first);&lt;/P&gt;&lt;P&gt;outputStream.Close();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;test.scr as below&lt;/P&gt;&lt;P&gt;NETLOAD&lt;BR /&gt;C:\\IFP20\\IFP20.dll&lt;BR /&gt;(MakeCircle '(0 0) 20)&lt;BR /&gt;_qsave&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it does not create any circle in the given dwg file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where I am making mistake. Please guide.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 10:48:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876294#M32769</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-14T10:48:25Z</dc:date>
    </item>
    <item>
      <title>Re : Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876638#M32770</link>
      <description>&lt;P&gt;In your script file, you may not use double anti-slashes and since AutoCAD 2014 the C:\IFP20 folder have to be added to trusted paths.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NETLOAD
C:\IFP20\IFP20.dll
(MakeCircle '(0 0) 20)
_.qsave&lt;BR /&gt;
&lt;/PRE&gt;
&lt;P&gt;You should first test the script directly from an AutoCAD session using the SCRIPT command.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 13:32:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876638#M32770</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-02-14T13:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876734#M32771</link>
      <description>&lt;P&gt;Interesting,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There must be something in our DLL's preventing their use then. We tried 3 of our own DLL's that we regularly use and none of them worked. They loaded, but they didn't actually&amp;nbsp;do what they were intended to do inside core console.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess we'll have to make an attempt to attach the debugger to core console and see if we can isolate what is causing that.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 14:01:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6876734#M32771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-14T14:01:43Z</dc:date>
    </item>
    <item>
      <title>Re : Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6878565#M32772</link>
      <description>&lt;P&gt;Hello Gile, Thanks for the reply. I ran the script directly into the AutoCAD and it runs absolutely perfect. But when I run through accoreconsole process in the code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;string currentFile = @"C:\Temp\Drawing1.dwg";&lt;BR /&gt;String consoleOutput = String.Empty;&lt;BR /&gt;String entityBreakup = String.Empty;&lt;/P&gt;&lt;P&gt;using (Process coreprocess = new Process())&lt;BR /&gt;{&lt;BR /&gt;coreprocess.StartInfo.UseShellExecute = false;&lt;BR /&gt;coreprocess.StartInfo.CreateNoWindow = true;&lt;BR /&gt;coreprocess.StartInfo.RedirectStandardOutput = true;&lt;BR /&gt;coreprocess.StartInfo.FileName = @"C:\Program Files\Autodesk\AutoCAD 2016\accoreconsole.exe";&lt;/P&gt;&lt;P&gt;coreprocess.StartInfo.Arguments = string.Format("/i \"{0}\" /s \"{1}\" /l en-US", currentFile, @"C:\Temp\test.scr");&lt;/P&gt;&lt;P&gt;coreprocess.Start();&lt;/P&gt;&lt;P&gt;// Max wait for 5 seconds&lt;BR /&gt;&lt;STRONG&gt;//coreprocess.WaitForExit(5000); //commented this line just for information&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;StreamReader outputStream&lt;BR /&gt;= coreprocess.StandardOutput;&lt;BR /&gt;consoleOutput = outputStream.ReadToEnd();&lt;BR /&gt;String cleaned =&lt;BR /&gt;consoleOutput.Replace("\0", string.Empty);&lt;/P&gt;&lt;P&gt;int first = cleaned.IndexOf("BreakupBegin") + "BreakupBegin".Length;&lt;BR /&gt;int last = cleaned.IndexOf("BreakupEnd");&lt;BR /&gt;if (first != -1 &amp;amp;&amp;amp; last != -1)&lt;BR /&gt;entityBreakup =&lt;BR /&gt;cleaned.Substring(first, last - first);&lt;/P&gt;&lt;P&gt;outputStream.Close();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it shows output as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Redirect stdout (file: C:\Users\PP\AppData\Local\Temp\accc201362).&lt;BR /&gt;AutoCAD Core Engine Console - Copyright Autodesk, Inc 2009-2013.&lt;BR /&gt;CoreHeartBeat&lt;BR /&gt;Regenerating model.&lt;BR /&gt;CoreHeartBeat&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Command:&lt;BR /&gt;Command:&lt;/P&gt;&lt;P&gt;Command:&lt;BR /&gt;Command: NETLOAD&lt;BR /&gt;Assembly file name: C:\IFP20\IFP20.dll&lt;/P&gt;&lt;P&gt;Command: (MakeCircle '(0 0) 20)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it does not create circle in the C:\Temp\Drawing1.dwg&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is going wrong, please guide. I am using AutoCAD 2016 64 bit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;test.scr is as below&lt;/P&gt;&lt;P&gt;NETLOAD&lt;BR /&gt;C:\IFP20\IFP20.dll&lt;BR /&gt;(MakeCircle '(0 0) 20)&lt;BR /&gt;_.qsave&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please note C:\IFP20 is in the trusted path of AutoCAD also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 03:08:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6878565#M32772</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-15T03:08:28Z</dc:date>
    </item>
    <item>
      <title>Re : Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6878897#M32773</link>
      <description>&lt;P&gt;It looks like "Command; _.qsave" and "Command: _quit" are missing in the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the way I do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;var args = $"/i \"{filename}\" /s \"{scriptFile}\"";
var startInfo = new ProcessStartInfo(accorePath, args);
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
var process = Process.Start(startInfo);
process.WaitForExit();&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Feb 2017 08:45:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6878897#M32773</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-02-15T08:45:04Z</dc:date>
    </item>
    <item>
      <title>Re : Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6879012#M32774</link>
      <description>&lt;P&gt;Hello Gile,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After executing below code it crashes and show error as '&lt;STRONG&gt;AutoCAD component has stopped working&lt;/STRONG&gt;' Do you want to debug. After pressing debug it is showing attached error image. What is wrong now? I am using .NET framework 4.0 both at exe and dll&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;string currentFile = @"C:\Temp\Drawing1.dwg";&lt;BR /&gt;string accorePath = @"C:\Program Files\Autodesk\AutoCAD 2016\accoreconsole.exe";&lt;BR /&gt;var args1 = $"/i \"{currentFile}\" /s \"{ @"C:\Temp\test.scr"}\"";&lt;BR /&gt;var startInfo = new ProcessStartInfo(accorePath, args1);&lt;BR /&gt;startInfo.WindowStyle = ProcessWindowStyle.Hidden;&lt;BR /&gt;&lt;BR /&gt;var process = Process.Start(startInfo);&lt;BR /&gt;process.WaitForExit();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is very hard for me to find out what is wrong. Please help. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 10:13:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6879012#M32774</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-15T10:13:41Z</dc:date>
    </item>
    <item>
      <title>Re : Acoreconsole with [LispFunction(&lt;commandname&gt;)]</title>
      <link>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6879332#M32775</link>
      <description>&lt;P&gt;Here's a minimalist testing console application working for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;script:&lt;/P&gt;
&lt;PRE&gt;NETLOAD "C:\Program Files\Autodesk\ApplicationPlugins\AcCoreConsoleLispFunction.dll"
(MakeCircle '(0 0) 20)
_.qsave&lt;/PRE&gt;
&lt;P&gt;Console application&lt;/P&gt;
&lt;PRE&gt;using System;
using System.Diagnostics;

namespace TestConsoleApplication
{
    class Program
    {
        static void Main()
        {
            var acCoreConsole = @"C:\Program Files\Autodesk\AutoCAD 2016\accoreconsole.exe";
            var scriptFile = @"C:\Temp\RunLisp.scr";
            var filename = @"c:\Temp\Dessin1.dwg";

            var args = $"/i \"{filename}\" /s \"{scriptFile}\"";
            var startInfo = new ProcessStartInfo(acCoreConsole, args);
            startInfo.UseShellExecute = false;
            startInfo.RedirectStandardOutput = true;
            startInfo.WindowStyle = ProcessWindowStyle.Hidden;
            var process = Process.Start(startInfo);
            var output = process.StandardOutput.ReadToEnd().Replace("\0", "");
            process.WaitForExit();

            Console.WriteLine(output);
            Console.ReadLine();
        }
    }
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;output:&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="accoreconsole_output.png" style="width: 677px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/322959i683BFD95B5E9FF8F/image-size/large?v=v2&amp;amp;px=999" role="button" title="accoreconsole_output.png" alt="accoreconsole_output.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 13:10:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acoreconsole-with-lispfunction-lt-commandname-gt/m-p/6879332#M32775</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-02-15T13:10:12Z</dc:date>
    </item>
  </channel>
</rss>

