AutoCAD 2013 Core Console

Have you ever wanted to run a script file on one or more drawings, without having to use the overhead of the entire AutoCAD application? Starting with AutoCAD 2013, you can. AutoCAD 2013 comes with a tiny application named AcCoreConsole.exe. (The AutoCAD Core Console). This is basically a stripped down version of the AutoCAD engine without the graphics screen. Talk about the ultimate "classic" interface!

So you might be thinking "AutoCAD is a graphics program...what do I want with a command line only interface?" At its most basic level, you can feed the Core Console a single script file that can create and edit entities and save those edits to a DWG file. Take this a step further and combine the Core Console with ScriptPro from Autodesk and you'll probably be processing script files, on multiple drawings, faster than ever.   

AcCoreConsole.exe window

I created a small script file that creates a few entities, makes an edit and then saves this work to a DWG file, and it runs and completes in about 2.5 seconds. You can barely get the splash screen to go away in 2.5 seconds when using full blown AutoCAD. Kean Walmsley over at Through the Interface has a much more in depth post on this application, and the AutoCAD Tips blog has a post on doing some more complex things with this tool, including batch plotting a set of DWG files to PDF.

What do you think about this?

Are you already using it? If so, what kind of things are you doing with it?

Comments

R.K., I wanted to drop you a note thanking you for a lisp routine that you posted on Augi (shown below) a while back. I have implemented it using while running the core console. Quick explanation: Hundreds of client drawings that we are trying to work from using their standards etc... Now we are to the point of plotting and are realizing the pain it is to plot using a script while that calls the specific layout tabs by name to plot. After searching online I found the routine below that renames the layout tabs to their generic titles sequentially (Layout1, Layout2.... Our usual standard is that one file (.dwg) is one plotted drawing and that is usually "Layout1". So I adopted your routine and called it in a script to be run in the core console to rename and then plot layout one. Thanks for your putting the routine together!! ~Greg

Lisp code:

;;; R.K. McSwain
;;; http://forums.augi.com/showthread.php?77060-Rename-Layout-tabs-on-multiple-dwg
(vl-load-com)
(defun RenLay ( kword / n)
  (setq n 1)
  (vlax-for x (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object)))
    (if (not (eq (strcase (vla-get-name x)) "MODEL"))
      (vla-put-Name x (strcat kword (itoa n)))
    )
    (setq n (1+ n))
  )
)

;;; Once loaded, call the routine with this in the commandline
;;; (renlay "Layout")
;;; This will rename the layout tabs in their current order to the
;;; default generic names "Layout1" "Layout2" etc...[/code]

Script:
[code];;; Script to rname layouts to their default names (sues a lisp)
;;; then runs the plotting script to print to PDF
(load "C:\\Print Job\\RenameLayouts")
(renlay "Layout")
;;; Start Plot 2 PDF script
(setq CurrDwgName (getvar "dwgname"))
(setq Fname (substr CurrDwgName 1 (- (strlen CurrDwgName) 4)))
(setq name (strcat (getvar "DWGPREFIX") Fname ".pdf"))
;Command:
FILEDIA
;Enter new value for FILEDIA <1>:
0
;Command:
-PLOT
;Detailed plot configuration? [Yes/No] :
Yes
;Enter a layout name or [?] :
Layout1
;Enter an output device name or [?] :
DWG To PDF.pc3
;Enter paper size or [?] :
ANSI B (11.00 x 17.00 Inches)
;Enter paper units [Inches/Millimeters] :
Inches
;Enter drawing orientation [Portrait/Landscape] :
Landscape
;Plot upside down? [Yes/No] :
No
;Enter plot area [Display/Extents/Layout/View/Window] :
Extents
;Enter plot scale (Plotted Inches=Drawing Units) or [Fit] :
F
;Enter plot offset (x,y) or [Center] <0.00,0.00>:
Center
;Plot with plot styles? [Yes/No] :
Yes
;Enter plot style table name or [?] (enter . for none) <>:
monochrome.ctb
;Plot with lineweights? [Yes/No] :
Yes
;Plot Scale lineweights with plot scale? 

;Plot paper space first? 

;Hide paper space objects? 

;Enter file name :
!name
;Save changes to page setup? Or set shade plot quality? [Yes/No/Quality] :
No
;Proceed with plot [Yes/No] :
Yes
;Command:
FILEDIA
;;;Enter new value for FILEDIA <1>:
1

This code works great for the current project but I wonder if one modification could be made. Currently, the LISP routine renames the tabs alphabetically based on the tabs names. It would be nice to have the routine rename the tabs from left to right. making the left-most tab named "Layout1"... thanks again ~Greg

Correction: the Lisp portion uses Visual LISP and doesn't work in the Core Console. So one modification to make it run in the CC would be to run only part of the overall procedure (the lisp) on the drawings using the acad.exe and then using the script to print to PDF using the Core Console...

Editors note: Edited to correct name.

 


All content is copyright © CAD PANACEA 2005-2013 unless otherwise noted and may not be reproduced. All comments posted to this blog are the sole responsibility of the person making the comment.

Google, as a third party vendor, uses cookies to serve ads on this site. Google's use of their cookies enables it to serve ads to users based on their visit to your sites and other sites on the Internet. You may opt out of the use of these cookies by visiting the Google ad and content network privacy policy.

Powered by Drupal