Getting started with AccoreConsole

By Balaji Ramamoorthy

AutoCAD 2013 has a command line version of AutoCAD that can help you with significantly faster batch processing of drawings. Please note that the use of this utility is not officially supported by Autodesk. Here is a quick introduction to get you started with it.

In the AutoCAD 2013 install folder, you can find the “AccoreConsole.exe”. Just running it will display the command line switches that can be used with it.

It accepts four command line switches :

1) /i : Used to specify the drawing file path on which to run the script file

2) /s : Used to specify the path to the script file.

3) /l : If language packs are installed, you have the choice to invoke the language version of accoreconsole. The commands in the script file can then be in one of the languages that you have installed in your system.

4) /isolate : Used to prevent the changes to the system variables from affecting regular AutoCAD.

As an example, it is most common to set the “FILEDIA” system variable to 0 in your script files.

But if you do not want this system variable change to take effect when you start regular AutoCAD the next time, then you can use the “isolate” switch. This ensures that changes are kept local to accoreconsole.

Finally, if you need more details regarding AccoreConsole, have a look at the DevTV.
AccoreConsole DevTV
Happy batch processing !


Comments

38 responses to “Getting started with AccoreConsole”

  1. Hi Balaji,
    I was testing the AccoreConsoleDemo application and on the custom tab I am trying to netload a custom .dll from the network but getting the error:
    Could not load file or assembly.
    Is loading from network not supported?
    Thanks,
    Ted

  2. Hi Ted,
    Sorry, I haven’t tried this with accoreconsole.
    I will give it a try and let you know based on what I find.
    Meanwhile, can you please try this suggestion and see it helps ?
    http://adndevblog.typepad.com/autocad/2012/09/error-netloading-plugin-from-network-location.html
    Thanks
    Balaji

  3. Happy batch processing !
    I think, you early promote AcCoreConsole. Sorry, but it is very curve program. Read about this bugs there: http://www.theswamp.org/index.php?topic=41918.msg471067#msg471067

  4. If this errors will corrected, then a program will be very useful. But today it is bad program…

  5. Error not in it. Read the link which I specified below, then you will understand a cause of error.

  6. Yes, I have that setting in my acad.exe.config file.

  7. Ted
    Maybe your dll file name (or its path) are contains one or more not English chars?

  8. Hi Ted,
    I tried providing a network path in a script file and then using it with accoreconsole.exe and it worked ok. Are you trying it from the command prompt ? When I tried it with the demo app, although it works, it does not display the output in the window.
    So, I suggest trying to use the accoreconsole from the command prompt. I have attached the screenshots that might be of some help.
    https://www.dropbox.com/s/27gp11wfkt0sawc/1.png
    https://www.dropbox.com/s/7ewzqnf21qybrf6/2.png

  9. Hi Andrey,
    I understand your frustration :(
    We have logged these requests with our engineering team based on your feedback and they will be prioritized.
    I agree that at present it does not work with localized version of AutoCAD but it still has its capabilities.

  10. Thanks Balaji,
    Can you try using the path to a dll file like this…
    \servername\folder\dll

  11. Hi Ted,
    I tried it and it works ok.
    Here are the screenshots that might be of some help. Have you used it like “”\\bancnd0300n12\Cases\NetTest1.dll” ?
    Pleae note the extra \ that is needed.
    Here are the screenshots :
    https://www.dropbox.com/s/2ok54ilkqdnolex/3.png
    https://www.dropbox.com/s/bnzjq38zxer5g00/4.png

  12. Hi Balaji,
    I tried as you said, it works when I am in autocad 2013, but when I am in the accoreconsole I get an error:
    Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly
    I’m typing exactly what I typed into the AutoCAD 2013 command line as I am the accoreconsole… any ideas why it would not work?
    Thanks for the help

  13. Hi Ted,
    Can you please share the script file, the drawing file and any other step that will help me in reproducing the issue ?
    I have come across such issues where a netload doesnt work inside AutoCAD. In such cases, running the caspol solves the issue.
    CasPol.exe -m -ag 1.2 -url X://Acad/TrustedAssemblies/* FullTrust
    Because it is working inside AutoCAD, I am not sure what else to suggest.
    If you can help me reproduce the problem, I can investigate this.
    Also it might help if you can try with another network share to see if it specific to a network location.

  14. Balaji I got it figured out finally. I didn’t realize there was a separate config file for accoreconsole (accoreconsole.exe.config). I added this to the config file and it worked.

  15. Hi Ted,
    I am glad you resolved the issue and thanks for sharing the solution with us.

  16. Can we load and defun lisp in accoreconsole?
    I try to plot all layout with accoreconsole. I can’t find a way to load a lisp in accoreconsole.

  17. Hi Fred
    Sorry for the delay.
    you can load Lisp, but the COM API (vla) functions do not work in acccoreconsole.
    Plotting of all layouts should be possible using a custom .Net / crx plugin loaded in accoreconsole.
    Please do let me know if you need any help with this.
    Regards,
    Balaji

  18. Hi,
    Thanks for your reply,
    I find a way to plot all my layouts. I use publish and a DSD botch created with a batch.
    The main problem is I can’t use Diesel Commands (nor Xpress Tools Rtext). I try to load Rtext in a accoreconsole, but I can’t plot where rtext with Diesel commands inside. Autocad makes me a white rectangle.
    But I love accoreconsole, when I use it, I increase my speed x2.

  19. Hi Fred,
    Sorry, that would not be possible in Accoreconsole. RText is a custom entity from the Express tools implemented in a .arx module and is not available for loading in coreconsole.
    If possible, you can have Rtext in such drawings exploded as regular text and then use them with accoreconsole.
    Regards,
    Balaji

  20. Hi,
    I have a c# launcher for my accoreconsole.Exe. I launch it through the command Process.Start
    I launch accoreconsole.exe with a script scr to netload a class in c# (same framework 4.0)
    If I launch the scr from a batch file (trhough cmd.exe, without my c# launcher), the scr is perfect. Runs without error
    If I launch the scr from my soft in c#, the netload is succees, but I can’t launch the command. Accoreconsole doesn’t regonize my command.
    I launch through :
    netload d:\test.dll
    I try with (command ..) Same issue.
    Have you got any suggestions?

  21. Hi Fred,
    Just wondering if SECURELOAD is behind this behavior.
    Can you please try setting that system variable to 0 in the script before your dll is netloaded ?
    Regards,
    Balaji

  22. Hi Balaji,
    Can I use this for multiple files at a time?
    I have a .Net dll which I am able to successfully load and process command for one file. I am trying to run same command on multiple files and read some information from all those DWG files. Is it possible to pass list of files so as to avoid launching accoreconsole again ang again?

  23. Hi Sam,
    This blog post should help, although AccoreConsole cannot work on drawings other than the one provided to it using /i switch.
    http://adndevblog.typepad.com/autocad/2015/02/parallel-aggregation-using-accoreconsole.html
    Regards,
    Balaji

  24. Hi,
    sorry to interrupt this…
    accoreconsole work great with LISP/VLISP application….you must think different and use coreconsole only to open file and not run script.

  25. Hi Andrea,
    If you can please share more details on how you got the vla functions to work with accoreconsole, we will all learn. Thanks
    Regards,
    Balaji

  26. Hello Balaji
    this looks very very nice, interesting. extremely promising.
    Do you know where I can get some documentation for AccoreConsole and writing these script files? Because at the moment I have no idea. I am a complete noob. I suspect that there may be others like me. Anyways, if you have documentation, pls post.
    rgds
    Ben

  27. Hi Ben,
    Glad that you are liking AccoreConsole.
    Here are a few more links to help with this topic :
    http://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console.html
    http://aucache.autodesk.com/au2012/sessionsFiles/3338/3323/handout_3338_CP3338-Handout.pdf
    http://autocadtips1.com/2013/01/30/up-and-running-with-the-2013-core-console/
    About writing scripts – There is no documentation on it, but it is simple to create it.
    Just try all the commands (both native AutoCAD commands and your custom commands) in the sequence that you want them to run along with any inputs that you want to provide. Copy them to a text file and name it as a .scr file.
    Here is a nice blog post explaining the steps :
    http://www.cad-notes.com/learn-how-to-write-command-scripts-for-autocad-and-automate-your-plotting/
    Regards,
    Balaji

  28. Hello Balaji
    thank you for this great utility.
    Is it possible to show simple examples of it netloading a .net file.
    I tried using your example which you attached in the samples provided but I could not get it to work – here is the relevant post in the forums: http://forums.autodesk.com/t5/net/netloading-dll-from-a-script-file-for-batch-processing/td-p/5944940
    and I could not find much documentation on the AccoreConsole
    any knowledge would be invaluable to me and to folks who will want to do the same thing.
    rgds
    Ben

  29. the .net dll has to be in a “trusted” autocad location. perhaps that is your issue? please google how to add that particular folder to autocad’s trusted list — open autocad and get to options, and find trusted locations and then add it there.

  30. Thanks for sharing

  31. Hansol Hong Avatar
    Hansol Hong

    I have a Question.
    accoreconsole.exe
    AutoCad2018 trial is over.
    CoreCommand works even though the trial version is over. However, GUI AutoCad2018 does not work. I only use CoreCommand (accoreconsole.exe).
    can I use it without an AutoCad2018 license?

  32. Hi Hansol Hong,
    accoreconsole is part of AutoCAD 2018, shouldn’t be used with out the AutoCAD 2018 license.
    If your interested is use only coreconsole, we have Forge Design Automation webservices, which is a coreconsole on Cloud.
    Please find these helpful links.
    https://developer.autodesk.com/en/docs/design-automation/v2/overview/
    https://forge.autodesk.com/cloud_and_mobile/2016/10/introduction-to-design-automation.html?_ga=2.99414622.1592239185.1509906582-757273763.1509351710

  33. NewGirl Avatar
    NewGirl

    I am having trouble with VLISP commands. Do you have any helpful tips?

  34. Hello Balaji,
    I am running AutoCad Civil 3d in silent mode, by using accoreconsole.exe /i “[drawing file].dwg” /s [Script File].scr” in command prompt. The issue is the command does not seem to enter into the dll. I have a write to console text message and a text file creation command in the dll file , but after executing in cmd, the text file is not created and the message does not appear as well. However there are no errors in cmd (attached image).
    Is there a solution? Thanks in advance.

  35. Manuel Avatar
    Manuel

    Hey there Balaji,
    what happened to the quick and easy option “/isolate”?
    Since ACAD 2022 accoreconsole.exe throws an error when using just “/isolate”. Now accoreconsole wants “/isolate “. I tried that with “/isolate user1 c:\temp\acc1”, but the whole process takes much longer and the specified folder “c:\temp\acc1” grows up to 4 GB. Couldn’t find anything useful about this new API. Can you help?

  36. Manuel Avatar
    Manuel

    Update (remove my first post):
    Hey there Balaji,
    what happened to the quick and easy option “/isolate”?
    Since ACAD 2022 accoreconsole.exe throws an error when using just “/isolate”. Now accoreconsole wants “/isolate < userid > < userDataFolder >”. I tried that with “/isolate user1 c:\temp\acc1”, but the whole process takes much longer and the specified folder “c:\temp\acc1” grows up to 4 GB. Couldn’t find anything useful about this new API. Can you help?

  37. Sergio Aviles Avatar
    Sergio Aviles

    Just stumble in to this, Would you be so kind to elaborate as to How did you make Accoconsole to work with Vlisp?

  38. Hello, is there anyone still on here?
    I have just started using accoreconsole and it seems like it should be the right tool for what I need.
    However, I am having issues with accoreconsole. I am currently running Map 3D 2023 and I also have Autodesk 2022 installed. When I attempt to run accoreconsole from the “C:\Application Files\Autodesk\AutoCAD 2023\” it opens then quickly closes. When I try the version in the 2022 folder it opens but it doen’t seem to be working correctly. I have a testing lsp, “Hello.lsp”. When I open the console and enter (load “C:\temp\hello.lsp”) I get this in the window “error: File load canceled: C:/Temp/hello.lsp”. I can open Map and use the commandline to successfully load the same Lisp file (using the same format). The Lisp file itself works.
    I had some issues with MAP before and my company’s IT provider uninstalled and then re-installed Map. I have been learning/programming C# and .Net using Visual Studio.
    What I am hoping to get from you folks are directions to correctly trouble-shoot this issue. I don’t know if I should be looking for a corrupt/miss-addressed files, the accoreconsole dependents files and links, a faulty flux-capacitor or even if there is something in the Registry I should look at.
    Thank you.

Leave a Reply to TedCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading