With the release of AutoCAD 2013, there is a new feature that is called the “Core Console.” This Core Console is a stripped down version of of AutoCAD that includes no buttons or user interface other than what looks like a cryptic command line.
If you have an AutoCAD 2013 product installed, you can open it and see for yourself what it looks like. It is located at C: drive > Program Files > Autodesk > AutoCAD 2013 > “accoreconsole.exe”
After launching the Core Console it looks a lot like the windows command line…
Notice the size of the Core Console. It weighs in at only 27kb on my computer. compare that to the acad.exe which loads when you open the normal AutoCAD interface and you can see why this Core Console can be your new best friend when it comes to batch processing files.
So if you need to run batch routines on files, the Core Console is meant to be quick and capable of running AutoCAD script files (.scr), LISP routines, .NET (dot net) dlls and other programming routines. (I am only familiar with script files and LISP so that is where I will focus my attention).
As I mentioned above, the Core Console is limited in what it can do. And luckily Kean Walmsley has already done the hard part and found out what commands the Core Console will recognize found [here] and Kean has also put together a nifty .txt file that contains the available commands as well found [here]. Thanks for putting that together Kean!!
If you have launched the Core Console as shown above go ahead and close it. You can see that it is a bit cryptic in that it isn’t obvious as to how to even use it even though they give an example of the syntax… It took me a while to get it to run for me and like the name of the post, I want to get you up and running with it as well.
For this post we will learn how to run the Core Console 2 ways. 1) by running ScriptPro 2.0 and 2) by running it by itself through a windows .bat (batch) file. Both ways we will use the same AutoCAD script file that prints the layout tab named “Layout1” to a PDF file.
If you would like to follow along with this example – Create a folder on your C: drive and name it “Test”. Place some drawings that contain a layout tab called “Layout1” and also place a copy of the below AutoCAd script file called “Plot2PDF.scr” in the C:\Test folder.
Link to script “Plot2PDF.scr” > https://docs.google.com/file/d/0B_y9I236zHwOYm00NllzbVRsQ2s/edit?usp=sharing
Using ScriptPro 2.0
ScriptPro 2.0 is free and can be downloaded from the following [THIS] link. The old version of ScriptPro does not let you set the Core Console to run the batch. The old version automatically uses the full-blown acad.exe file.
Once you have it installed go ahead and launch ScriptPro 2.0
There should be a desktop icon that was installed or you can navigate to it by:
Start > All Programs > Autodesk > ScriptPro.exe (shown below)
The only trick to using ScriptPro and the Core console is setting ScriptPro to use the correct .exe file.
Once ScriptPro is open,
- Click “Settings”
- Browse – navigate to C:\Program Files\Autodesk\AutoCAD 2013\accoreconsole.exe Select the .exe file.
- Click OK
Now that the Core Console is set, you can build a list of files and select a script as normal.
To select files:
Click “Add From Folder” button and then browse to a folder from the list and then click OK.
One great thing about ScriptPro is that you can build a list
To select a script file that will be run on each of the files:
- Click “Browse” in the “Script file” section
- Browse to the location of the script file
- Select the script
- Click “Open”
Now that the files are listed and the script file is set the batch process can use the Core Console to process the files.
To process the files that have a check mark next to them press the button “Checked” (shown below)
To use a batch file (.bat) use the following and adjust accordingly for your needs.
If you copy the following line into a Notepad file and save it with the extension .bat it will become a batch file.
But before you run it, it would be nice to know what it is doing so below is a simple explanation of what the .bat file does:
Here is the content of the batch file:
FOR %%f IN (“c:\Test\*.dwg”) DO “C:\Program Files\Autodesk\AutoCAD 2013\accoreconsole.exe” /i “%%f” /s “c:\Test\Plot2PDF.scr” /l en-US
Make sure to copy it as it is shown in the picture -meaning in one line. I was not able to get it to run when the content was on multiple lines. It only worked for me when it was all in one line. (but then again, I am a novice at these batch routines….)
The result of this is the following: it created PDFs of Layout1 of each of the drawings and placed the PDFs in the same folder as the drawings.
> Thanks for putting that together Kean!!
My pleasure. Great post!
Thanks for the compliment Kean. Thanks for stopping by and i want to thank you for all that you do.
I just hope that more people find the Core Console useful. I think that it is a very helpful feature and look forward to finding out more about it and finding more ways of using it.
You’re right, this could be a very cool tool. I’m wondering if it can be made to work with Sheet Set Manager to speed up plotting a large set of plans.
I think that the Sheet Set Manager should be able to utilize the Core Console. The SSM is something that I am unfamiliar with though…
If you have a lisp routine or script that automates the process of plotting (publishing) then I think that the Core Console should be able to handle it.
On a side note, I am interested in learning more about the SSM from this video series as well: http://blog.jtbworld.com/search/label/Sheet%20Set%20Manager
HI! Can you help me!?
To start AutoCAD 2012 for automation, I use this piece of code:
const string progId = “AutoCAD.Application.19”;
var acType = Type.GetTypeFromProgID(progId);
var cadapp = (AcadApplication)Activator.CreateInstance(acType, true);
Or something like that…
Now, how can I launch the console for COM interation!?!?
outstanding ….. I do have a problem I would like to run a deployment from a UNC path and then run a script that copys file into the installed file structure , I have played with “pushd” & “pop” with no luck….can any one help….PLEASE
script below originated from the short cut data, Start in and run command.
Setup.exe /qb /I %dir1%\2013Mechanical_64bit_Network_image.ini /language en-us
This tutorial is EXACTLY what I’ve been looking for! However, it seems that the ScripPro2 isn’t available any longer?! What are my options for doing this type of work?
Thanks for your help
It appears that Autodesk pulled the plug on ScriptPro, But the good thing is that the “ADN” Autodesk Developer Network provided an offsite place for you to still be able to install it. It is a legit website from the ADN team who realize that people really liked the ScriptPro utility. I am hoping that they somehow integrate it into future versions of AutoCAD.
Here is a link to the “GIThub” site where ScriptPro is currently available.
Also note that they have other utilities available from this page as well for other Autodesk products. They have provided the source code as wel as the install, if you save this for future releases of AutoCAD that would be helpful. That way you could probably ask someone who knows that programming language to be able to compile it for you for future releases where ScriptPro 2.0 may not work. Another note – AutoCAD 2016 will be comming out next year and tus most likely introduce a new file type “2016 version of .dwg” files.
I dont know how to do this type of programming or I would happily do it since i love how ScriptPro is able to use the Core Console.
Seems that Core Console plotting can not “see” OLE objects, specifically raster data that has been pasted in the DWG files. Will OLE ever be supported with the CC ?
I just looked into this as well. I am surprised that it doesn’t handle OLE objects. This goes to show how often I deal with them. I rarely deal with them and haven’t had to run any batches with the CC that contain any OLE objects.
I will make a feature request for this in upcoming versions of AutoCAD and would suggest that you do as well. You can be part of future versions of AutoCAD by joining the Beta testing team at beta.autodesk.com
They are pretty responsive to suggestions there as long as you don’t complain too much or protest too much. Some people who are beta testers whine and vent and it doesn’t actually help the process of getting the various features fixed in AutoCAD.
One of my feature requests for future versions of AutoCAD is they have a built-in batch processor since they abandoned Script Pro. I really liked Script Pro and how it could use the Core Console. But if the CC is limited like not being able to handle OLE objects, that is something that they will need to address before making it integrated into some sort of batch processor.
Pingback: AutoCAD Core Console |
how to use coreconsole with LISP/VLISP function ?..
put your lisp/vlx or application file in the application startup suitcase and use coreconsole.exe from cmd or bat file.
Don’t forget to remove your application file from the application startup suitcase before closing AutoCAD. :)
How can i run AutoLisp .lsp file from the core console???
it depend on what you need to do,….some function cannot be executed from coreconsole directly.
Andrea, I like your idea of using the PUBLISH command as a batch processor instead of the Core Console
Thanks…it work,….but it is not the fast way..:)
Pingback: Hurricane Batch Processor Review | AutoCAD Tips
Pingback: Son of a Batch! AutoCAD Core Console Through Lisp – house of bim
you can create a .Net program to expand the possibilities and create new commands.
Thanks for the great tips
I really appreciate the detailed instructions and screenshots
I gave the steps listed above with script pro a try and i can’t seem to get it to work with core console. Is there anything i should be aware of that would cause this to work in autoCAD but not core console ?
some command must be used with vla-sendcommand instead of command or vl-cmdf ..
(vla-SendCommand (vla-get-ActiveDocument (vlax-get-acad-object)) “CHANGE\n(ssget \”_X\”)\n\nP\nC\n1\n\n”)