Running Script in accoreconsole Not Working as Expected

whitt0213
Contributor
Contributor

Running Script in accoreconsole Not Working as Expected

whitt0213
Contributor
Contributor

I have a script which creates a .dsd file and then batchplots (publish) them to a .pdf. I would like to automate this further by running it with a routine in accoreconsole. However, I can't seem to get it to run correctly in the accoreconsole and I can't figure out where I'm going wrong. When I run my .bat file, the command prompt comes up and it runs through the code as if it is doing something, but it doesn't generate the .dsd file or the .pdf file. I've attached the script file (printPDF) and the bat file (batch). 

0 Likes
Reply
294 Views
1 Reply
Reply (1)

ec-cad
Advocate
Advocate

Your original batch.txt

"C:\Program Files\Autodesk\AutoCAD 2016\accoreconsole.exe" /i
"S:\Folder\Drawings\Test\BatchPlot\Test Drawings\test.dwg" /s
"S:\Folder\Drawings\Test\BatchPlot\Test Drawings\printPDF.scr"
PAUSE

 

First, rename that printPDF.txt to be printPDF.lsp


Somehow, you have to 'load' printpdf.lsp and call the function.

Maybe in your printpfd.scr that you are calling above , make it like this:
[New printPDF.scr]
(load "c:/path/printPDF.lsp")
(c:printpdf)
[end of file]

 

Or in printPDF.lsp, remove the function call and just 'load' it.
remove the line (defun c:printpdf()
and the very last line ')
save it as printpdf.lsp

Then the script gets easier. (1) line.

[New printPDF.scr]
(load "c:/path/printPDF.lsp")
[end of file]

ECCAD

0 Likes