Batch Save Utility - Script Failing to save .dwg

Hi all,

I’m having some issues with Batch Save Utility and a script I’ve made.

I’ve tested the script on it’s own and it works just fine, but when I use it with the utility I get a Failed to save error.

I’ve added the script links to both Trusted Locations and Support File Search Path, in both Civil 3D and Autocad, all version that I have installed, still no go.

This is the script:

ATTSYNC
N
BUR-A0-Landscape
ATTSYNC
N
BUR-A1-Landscape
ATTSYNC
N
Z-Zz_10_70-R1_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R2_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R3_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R4_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R5_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R6_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R7_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R8_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R9_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R10_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R11_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R12_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R13_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R14_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R15_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R16_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R17_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R18_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R19_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R20_A0-Rev
ATTSYNC
N
Z-Zz_10_70-R1_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R2_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R3_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R4_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R5_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R6_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R7_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R8_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R9_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R10_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R11_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R12_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R13_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R14_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R15_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R16_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R17_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R18_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R19_A1-Rev
ATTSYNC
N
Z-Zz_10_70-R20_A1-Rev
qsave
close
Y
quit

Anyone got any idea what I’m doing wrong?

Thank you.

Edit, This is what I can see in the log:

**** System Variable Changed ****
1 of the monitored system variables has changed from the preferred value. Use SYSVARMONITOR command to view changes.

AutoCAD menu utilities loaded.
Command:
Command:

Command:
Command: ATTSYNC
Unknown command “ATTSYNC”. Press F1 for help.

Save errors are very often related to access problems.

Does it work with brand new drawings in a brand new location on your local disc (i.e. if you copy the files you want to run it on to a new directory first)?

I get the same results whether I store new drawings on my local drive or on the server, unfortunately. Looking at the log, there’s the Unknown command “ATTSYNC” error, which is strange because I’ve tested the script by running it from inside the Autocad command line, and I get no errors.

This is the error thrown by Batch Utility Save

Hi Victor,

The script works when you run from inside AutoCAD because all of the functionality is there as the full application is being used. While not on the list, I would guess that the command ATTSYNC is not supported by the AutoCAD Core Console, which is the “headless” or command line only version most scripting programs use. It is basically a version of AutoCAD that has had most all of the graphical comments removed, and as a by product not all commands are supported.

Hi David,

Thanks for that, I just had a look and ATTSYNC command is not part of the unsupported ones. Time to dig deeper.