Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Running Script in accoreconsole Not Working as Expected

1 REPLY 1
Reply
Message 1 of 2
whitt0213
160 Views, 1 Reply

Running Script in accoreconsole Not Working as Expected

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). 

1 REPLY 1
Message 2 of 2
ec-cad
in reply to: whitt0213

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report