PDF Export via LISP

#1
Not a lot of traffic here, but I'll give it a try...

I wish to export a drawing I have created via lisp as a PDF file. In theory the code below should work, but what I get is the default DWG format instead. Anyone got any ideas? Is this a bug?

; (load "pout")
(defun C:pout ()
(command "export" "c:\\mypdf.pdf")
)

FOrgot to mention, I'm using CMS ICAD v6.6 Pro

#4
Sorry I was no help. I use a different brand of Intellicad (Cadopia) that has the PDFOUT command in their recent release. The only suggestion I have is that you could possibly use an external PDF converter program (there are many) and call it from within your lisp. I presume CMS Icad has STARTAPP or SHELL or something to call a windows program. I have successfully made external calls in Autolisp by using FINDFILE within a loop to check for the existence of the new file. Good luck.

PDF Export

#6
Thanks for both replies:
Admin - The EXPORT PDF function is not available via LISP. EXPORT C:\\MyDwg.pdf produces a DWG file, please see above.

CAD_B - I had been using Print and GhostScript to create a PDF, however v6.6 seems to have changed how Print sizes are stored and it now will not remember what I have set - This probably needs to be a new thread.

#7
timg,

CMS IntelliCAD 6.6 will remember the print configurations (Print Area, Print Scale, Print Style Table, Print Offset, etc.) if "Save Changes to Layout" is checked for Current Layout (Print dialog).

To use an external application via LISP call the function startapp with its arguments. For instance, (startapp "notepad" "C:\\TEMP\\SomeText.txt").

Thank you,
JCAMPOS

#8
Thanks for the reply JCAMPOS, I think I didn't express my problem very well. I have been able to save the general layout, it is the print Setup that is giving me problems.

I use Ghostscript with a port re-direct to create PDF files (PDF export doesn't seem to cope well with viewports the way I am using them) Anyway, when I use this "Printer" in other programs, no problem, but in IntelliCAD in keeps defaulting to 11x17 paper size. How can I set the correct paper size? I usually set it at Legal and that works fine for me.

These print-outs are automatically generate via LISP, I don't want to have to keep an eye on it and change the settings every time.

making PDFs

#9
for what it's worth, I suggest installing a PDF printer emulator (for example PDF995), then using it as you would any other Windows system printer.

I've found this method to be easier to control the lineweights and other variables involved in getting a good quality PDF.