Plot To PDF And Save In Specific Location Lisp

Plot To PDF And Save In Specific Location Lisp

S.T.123
Participant Participant
1,642 Views
3 Replies
Message 1 of 4

Plot To PDF And Save In Specific Location Lisp

S.T.123
Participant
Participant

Hi, 

 

I have a super simple lisp I've typed up which creates a PDF based on the page set up already set in the drawing. 

Currently it just seems to dump the PDF on to my desktop. 

 

My question is, how can I add to the lisp so that I can specify where I want the PDF to be saved. I'd like to do this within the lisp so that the location is set within the lisp code and then auto saves the created PDF there every time run it. 

 

Also if anyone is able to solve my problem, please explain what the commands etc are to get it done. I'm new to writing lisps

 

What I've got so far;

(defun c:PDF ()
(COMMAND "TILEMODE" "0")
(COMMAND "-PLOT" "NO" """" """" """"))

0 Likes
1,643 Views
3 Replies
Replies (3)
Message 2 of 4

S.T.123
Participant
Participant

Also just to add, under the Options -> Plot and Publish -> Default location for plot to file operations  I have it directed to another folder named PDF which lives on my desktop. It's that same for my Publish Options Information as well. 

I have no idea what is causing it to save to the desktop as is. 

 

0 Likes
Message 3 of 4

imadHabash
Mentor
Mentor

Hi,

>> ...which creates a PDF based on the page set up already set in the drawing.

Since you have a page setup ... how about trying the already existing option in AutoCAD for Auto Publish with one click . also you can from Automatic Publish Settings decide the Location for your PDF output . start to know from here . >> Click <<

 

All the best ... 

 

 

Imad Habash

EESignature

0 Likes
Message 4 of 4

Sea-Haven
Mentor
Mentor

Have a look at the plot pdf range.lsp Needs Multi getval.lsp to work.

 

 

 

 

0 Likes