I am having trouble getting a lisp file that creates a PDF file to work with AutoCAD Mechanical 2012.
I developed this process for AutoCAD Mechanical 2010 and it works perfectly, but with AutoCAD 2012 I get an AutoCAD message box that says "Cannot find specified drawing file. Please verify that the file exists."
The process works like this with AutoCAD Mechanical 2010
An external process launches acad.exe and the path to the dwg file is given on the command line
"C:\Program Files\Autodesk\ACADM 2010\acad.exe" C:\work\somedrawing.dwg
AutoCAD is configured to load the AutoLISP file through the startup suite, the AutoLISP file runs itself when loaded.
(The AutoLISP file is more or less just runs the -EXPORT command).
The AutoLISP script exits AutoCAD, the external process grabs the PDF file and sends it off to another process.
This works perfectly well with AutoCAD Mechanical 2010, but not with 2012. I am working on the same machine and I verified that I have the latest AutoCAD SP installed. I also verified that the Lisp routine works in 2012 if I run it by loading it manually. I've also tried loading it with acaddoc.lsp, but the same problem occurs.
Does anyone have any other suggestions? I am in a bit of a bind here.
I found a solution to my problem - I will update this thread in case someone in the future has the same issue and discovers this thread.
With AutoCAD 2010 I was able to have and external process launch AutoCAD with a drawing as a command line parameter, I had a lisp routine configured to automatically load and run via the startup suite. The lisp routine runs the -EXPORT command and then quits AutoCAD. For some reason this same proces fails with AutoCAD 2012.
Now I have the external process write and AutoCAD script and then it launches AutoCAD with the /b switch that loads the script file. The script file gives the command to open the DWG file and then to load the AutoLisp file that runs the -EXPORT command.