PDF例程绘制到桌面\PDF文件夹:
不错。
想法(为了将来的维护):您可以在脚本中的PLOT命令中添加一些留档选项。
...
(command
"-plot"
"yes" ; Detailed plot configuration? :
(getvar 'CTAB) ; Enter a layout name or [?] :
"Ghostscript.pc3" ; Enter an output device name or [?] :
"ARCH E1 (30x42)" ; Enter paper size or [?] :
"inches" ; Enter paper units :
"landscape" ; Enter drawing orientation :
"no" ; Plot upside down? :
"limits" ; Enter plot area :
"1:1" ; Enter plot scale (Plotted Inches=Drawing Units) or :
"center" ; Enter plot offset (x,y) or :
"yes" ; Plot with plot styles? :
"Ghostscript.ctb" ; Enter plot style table name or [?] (enter . for none) :
"yes" ; Plot with lineweights? :
"no" ; Scale lineweights with plot scale? :
"no" ; Plot paper space first? :
"no" ; Hide paperspace objects? :
"yes" ; Write the plot to a file :
(strcat
"C:\\\\\\"
(vl-filename-base
(getvar "dwgname"))
;; "-FULL-SIZE.plt"
) ; FILE NAME
"yes" ; Save changes to page setup ?
"yes" ; Proceed with plot :
)
...
@echo off
:: process files given as argument to this batch script.
::
:: Last Updated: 04.14.20 9:41:00 AM
::
:: BY: John Kaul
::
set script="LEFT BLANK"
set script=%script:\\=\%
:processArgs
if [%1]==[] goto endmark
title "%~f1"
call "C:\Program Files\Autodesk\AutoCAD 2021\accoreconsole.exe" /i "%~f1" /s %script% /l en-US >"C:\temp\cleanup.log"
if errorlevel 1 goto errormark
SHIFT
goto processArgs
:errormark
echo.
echo.
echo ERROR processing %~f1
pause
echo.
:endmark
rem
rem finished
rem
我在上面添加了红色部分,以显示它正在处理的文件
是否有什么可以显示当前的数字,例如100中的21? 以下应该能给你想要的,-即" Processing:c:\ temp \ my drawing . DWG " @ echo off 。
::处理作为该批处理脚本的参数给出的文件,。
::。
::最后更新时间:上午09 . 25 . 20 7:51:30 。
::。
作者:约翰·考尔。
。
set script = " % ~ dp0 \ batch drawings _ accoreconsole . SCR " 。
设置脚本=%script:\\=\%。
:: -创建用于提示的参数计数器,。
设置argc=0。
设置count=1。
找出我们有多少个参数,。
for % % x in(% *)do set/A argc+= 1 。
。
:processArgs。
if [%1]==[]转到结束标记。
title "%~f1"。
调用" C:\ Program Files \ Autodesk \ AutoCAD 2021 \ accoreconsole . exe "/I " % ~ f1 "/s % script %/l en-US > " C:\ temp \ clean up . log " 。
回显处理[%count%/%argc%]: %~f1 。
设置/A count +=1。
如果错误级别1转到错误标记。
SHIFT。
转到processArgs。
:errormark。
回声,。
回声,。
回显错误处理%~f1。
暂停。
回声,。
:结束标记。
快速移动。
rem完成。
快速移动。
。
页:
1
[2]