Reprisals and the Civil 3D Batch Save Utility

Jump Kit

The Framework for Civil 3D
Get More

Templates Only

See The Framework Work
Get More

Become a Member

Master Civil 3D
Get More

Autodesk Civil Videos

Free Civil 3D Training
Get More

Framework Videos

Free Civil 3D Videos
Get More

You gotta love new Autodesk tools. They do tend to make the Civil 3D expert in us become a newbie with a click or two. This happens to me. It happens to you. Sometimes it’s actually the deep dark past, and not the new, that provides the proverbial rock we stumble over. Perhaps this short post about my most recent face plant will spare a few folks this sort of embarrassment and the ever-present specter of wasted time.

Batch Save Utility Sanity

The new Batch Save Utility is (available for multiple releases of Civil 3D on the subscription site) is the real deal. This is a new useful CAD Management tool for Civil 3D.

The earlier post Batch Save Utility in Civil 3D 2019 covers the basics. It also outlines some gotchas I discovered in testing of the new tool. Read it and watch John Sayre’s included video demo which covers a couple scenarios where the tool might be useful. There are many more.

Here is the link to the Batch Save Utility tool help page in the Civil 3D 2019 help. Read it.

Take Away Reminders

The Batch Save Utility tool assumes you understand the AutoCAD SCRIPT and SCRIPTCALL commands and how to employ basic AutoLISP function calls in a script.

  • The tool will not help you debug errant scripts or bad AutoLISP code.
  • The Quit button in the tool is not the same as the Windows Close button which is really what you want do to when some things go wrong.
  • Always carefully test the script(s) on a small set of DWG and DWT files locally.
  • You probably want the default time out values to be as close as possible to the typical time to process your script(s) requires.
  • The time out values should take into consideration the size and content of the DWG/DWT file processed and the number of files processed simultaneously on the local computer.

The Face Plant

When you manage, maintain and continuously improve as many Civil 3D resources as I do, scripts and a certain about of AutoLISP function calls are part of my typical soup du jour. These are typical CAD Management things for many. I admit that a certain amount of shamanzy-pantzy chefery is part of our infamous Framework for Civil 3D Spreadsheet Tools.

Here’s the scenario…

I have a script(s) that I know works. I have AutoLisp that loads and I know works. My script in the Batch Save Utility tool errors out on the AutoLisp load for no discernable reason. Arrrgh. The smart people in the room are now laughing at me.

I search vainly for typos and errant line feeds in the text files. Basically, I beat my brains out for a couple of frustrating hours and then it hits me…

It’s a Security Screech

Silly me. I forgot. AutoLISP became potentially malignant code way back in R-14.

Mind you. I’m trying to run the Batch Save Utility tool as a different Windows User than the initial installed Windows User as well.

For the current me the Batch Save Utility tool’s ..\Scripts folder and for the ACAD engine the tool calls this is apparently not a Trusted folder. Who would have thought?
The AutoLISP code is not allowed to load from there in my current security context.
For regular old Civil 3D itself the ..\Scripts folder is a Trusted folder thanks to the security mechanics in the default Civil 3D 2019 install.
Therefore in that Civil 3D specific security context, everything works fine.

The perverse nature of inanimate objects. Arrrgh.

The old AutoCAD SECURELOAD system variable came to the rescue. In the script:

  1. Set SECURELOAD to 0
  2. Load the LISP
  3. Set it back to 1 or 2
  4. Call the LISP
  5. Move on to more important things…

Hopefully, Autodesk will fix the independent Batch Save Utility install so this Trusted folders issue doesn’t happen to the unwitting in the future. I won’t hold my breath. We can hope.

For now, maybe you at least may avoid a painful lesson yourself.
It seems fitting. After all, avoiding this type of silliness is a great reason to employ the Framework.

Civil 3D 2019 and the Framework for Civil 3D

The current Release 7 2018 build of the Framework for Civil 3D runs great on Civil 3D 2019 based on our preliminary testing of the shipping build of Civil 3D 2019.

At this point Release 7 runs on a staggering 4 to 5 supported releases of Civil 3D albeit with some differences in capabilities based on the Civil 3D release you want to run. No matter which release of Civil 3D you run if you own the Framework for Civil 3D, your work got easier today.

Get Back to Work
Get the Framework for Civil 3D