Message 1 of 4
Export to PDF working differently in acaddoc.lsp

Not applicable
11-23-2015
07:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm creating a system to export 100s of drawings to PDF, via an acaddoc.lsp file which calls the "export" command, then using another app to open all the dwgs in sequence, thereby executing the contents of acaddoc.lsp on each.
The following script works fine if I open the dwg and run it from vlide, but if I run it from acaddoc.lsp it doesn't work.
I get the "plot complete" window, and it says "Errors and warnings found" but when I open the "click to view plot and publish details" I get told
"There are no plot or publish details to view."
Any ideas why this might be failing, or how I go about finding what those mystery errors are, or if there is a better way to go about the whole thing?
Thanks!
(vl-load-com) (defun export_to_pdf () (setq target_destination "C:\\Users\\Andrew\\Desktop\\Test PDF out\\Test.pdf") (vla-put-StyleSheet (vla-get-ActiveLayout (vla-get-ActiveDocument (vlax-get-acad-object)) ) "" ) (princ target_destination) (command "-export" "P" "C" "N" target_destination) (princ "should have exported") ) (export_to_pdf)