The management of a Civil 3D customization and the many resources required by the software to function well in a Civil 3D production environment is no small task. When it is time to upgrade to a new release or a significant new Civil 3D Update, it pays to be aware of and to employ the latest available tools. Meet the BS Wingman.
Civil 3D Batch Save Utility
Autodesk released the Civil 3D Batch Save Utility with the initial Civil 3D 2019 release, but the tool works for most, if not any recent, release of Civil 3D you have installed on the local machine. Batch Save wasn’t installed with your older release of Civil 3D. However, you can now separately download the Batch Save Utility for older releases of Civil 3D from your Autodesk subscription account page.
Update Words of Warning
Make sure you have the latest Updates (aka – Service Pack) for your release of Civil 3D installed.
The Civil 3D Batch Save Utility also employs the latest version of the Civil 3D Object Enabler.
If you don’t have the recent Civil 3D Object Enabler 2019.1 Update installed and want to perform Civil 3D 2019 upgrade tasks, the current 2019.1 version of Batch Save will throw errors.
Here is the link to that download.
The following two previous blog posts cover some not-so-basic mission critical issues and feature an introductory walk-through video.
For another recent video walk-through see the Civil 3D Batch Save Utility Basics page.
The Civil 3D Batch Save Utility Works
The Framework for Civil 3D is a complete managed system that supports the production use of Civil 3D and any customization of the backend resources that you can imagine. Customers say the Framework even enables forms of customization they never dreamed of before they started to employ it.
Since the initial release of the Civil 3D Batch Save Utility I’ve had the opportunity to put the tool to some very serious use. The tool was used in multiple Civil 3D releases to update:
- Multiple sets of Civil 3D templates in both STB and CTB
- A library of Layout resources drawings for the Plan Production Tool
- A library of Assembly resource drawings
- The huge Jump Kit Style Library and the thousands of Point Styles in the Symbol Set
- The Framework’s two sandbox Civil 3D Projects for both STB and CTB
It’s About More Competency
If you employ a recent build of the Framework of Civil 3D in any release, the Civil 3D Batch Save Utility performed part of the work. The tool is not a magic button, but is a better way to get this sort of maintenance work done a lot faster.
Most of us who do this sort of Civil 3D customization and CAD management maintenance work understand the fundamentals of AutoCAD-based scripting. We also usually have some knowledge and experience with basic to intermediate AutoLisp.
The Civil 3D Batch Save Utility couples these classic AutoCAD tools with the capability to run that script and lisp based environment in multiple headless (no User Interface) independent sessions of Civil 3D. The headless multiple session environment is a significant boost in both performance and potential programmed capability.
The Framework’s many Spreadsheet Tools employ and produce AutoCAD scripts by default. For many resources that we need to change, the congress of Spreadsheets Tool script(s) and Batch Save is a powerful Civil 3D Standards upgrade engine.
Civil 3D Batch Save Utility Tips
My intent is to help provide users with a more consistent and managed way to employ The Civil 3D Batch Save Utility tool. You may not have quite the same number and/or upgrade complexity issues we face in maintaining and updating the entire Framework in multiple releases. The lessons learned still apply.
Civil 3D Batch Save will currently by default not process raw ACAD, Map3D, or other ACAD-based software drawing files. This is a good news and bad news thing. The tool explicitly looks for the Civil 3D object model present in the drawings to process. Batch Save cannot save back to earlier releases of the Civil 3D object model.
Since someone asked…It is probably possible to employ Batch Save to automate the production of raw exported AutoCAD deliverables from Civil 3D.
The following tips do assume you have some trial and error experience with the Civil 3D Batch Save Utility tool. You simply must do the BS do for some tips presented here to make sense.
For you programmer types - Forgive me for no mention of Civil 3D API calls which are beyond the scope and intent of this post. There are certainly a few intriguing potential apps in there.
Employ a standardized separate file location for .scr and .lsp files
The default install location is in a Windows user profile file location.
In truth you will probably not employ the scripts all that often. These scripts are hopefully not Civil 3D release specific either. Unless you are just simply upgrading drawings, these scripts will take some development and testing. Therefore, it is too easy to lose them in a user folder. Save them elsewhere.
You will need to employ SECURELOAD calls and full paths in scripts to handle the LISP security issues.
See the second post above.
Employ the default Batch Save log location
The install does create the log file location in a generic file location (C:\BatchSave). This allows you to systematically delete and/or keep reporting logs. You do want to generate the individual dwg log files most of the time.
You temporarily want these individual dwg file logs to check results. Recognize that it is possible for Batch Save to report general file upgrade success even when an individual script file may fail.
Remember that additional log .csv files are also written to file folders where .dwg file are processed.
Employ a standardized separate file location for testing and running some scripts
A non-user temporary selected folder location is pretty important for script and lisp file development and testing.
You may also need this temporary folder to manage and control the script access to specific drawing files for special conversion and/or upgrade purposes. For example: you must process STB and CTB based Layout templates separately and differently to update the layer scheme in them.
Employ chained SCRIPTCALLs in a top end script to achieve maximum flexibility and results
In other words – Always employ a top end script to call and then control the order and specifics of a chain of script and lisp files that execute sequentially on each dwg file.
Recognize that SCRIPTCALL is a different command than SCRIPT. Just so you know, SCRIPTCALL was introduced in the 2016 release cycle.
This chained script capability allows you to modify each dwg file systematically in many ways and for multiple different purposes. For example: you may want to redefine blocks in one set of dwgs and/or the layer scheme in a different set of dwg files.
Often you may need pairs of script and lisp files. This is most often true when you have a series of upgrade tasks to perform on each dwg file.
Maybe it helps to think of things this way. Scripts work best and fastest to process individual things (the ACAD tables for example) in a dwg file and lisp works best to process the whole file. If you are a lisp geek, you know/believe differently of course.
Convert dwt files to dwg files prior to Upgrade conversions
Batch Save in some releases seems to have statistically more failure issues with dwt files than dwg files. Best to avoid the hassle and the unexplained nature of perverse inanimate objects.
Technically, you could build scripts to perform the back and forth automatically. I had more success doing this in separate script calls and therefore different headless sessions.
Obviously, classic pre and post process .BAT files also work and certainly don’t involve Civil 3D code at all.
Employ easy to apply Read Only properties to exclude dwg processing
Particularly, if you are upgrading Civil 3D project drawing content, it is generally easiest to employ Read Only file property settings.
The File Date options restrictions also work in Batch Save, but are probably a bit more dicey to maintain and manage in the real world without a lot of detailed knowledge of the entire storage structure of each project.
See the first Batch Save Utility in Civil 3D 2019 post above about the Batch Save XML options file details. As of this posting Autodesk has not fixed the saving of all options consistently to the XML options file.
Restrict the Timeout option and Number of Sessions Used
Test on real world samples to find reasonable values for your content and particularly for your project content.
The default options for these values are pretty absurd.
If a session fails, you typically want it to die quicker. Failures more often than not are the result of our poor planning and execution in the script and lisp code.
The number of sessions run is a trade-off between the system resources of the local machine doing the work and the maximum size and complexity of the drawing files processed. More simultaneous sessions may not speed up the processing significantly.
If you are processing lots of files in network locations, remember to take into account network bandwidth and server load.
See the first Batch Save Utility in Civil 3D 2019 post above about the Batch Save XML options file details.
Get the Framework for Civil 3D
Higher Standards to Build On