Jump to content

Drop an externally saved PDF document with Lisp into the WORKINGFOLDER


Manuel_Kunde

Recommended Posts

Hello all, when I have saved my drawings for the customer as PDF, I still put a PDF document in the folder wich is saved outside of AutoCAD (locally on the computer).
Is it possible to retrieve this file via a Lisp (maybe with a Ghostscript) and put it in the folder where the PDF is stored (Workingfolder)?

(The PDF has multiple pages, so I can't put it on a layout in the DWG file.)

Link to comment
Share on other sites

So you are wanting 2 copies of the PDF, one stored locally and one in the working folder? 

 

Do you use a LISP to plot your PDFs? In which case I would simply change that, duplicate the line that actually plots the PDF and change the filepath part from local-folder to working-folder. Would that work?

Link to comment
Share on other sites

1 hour ago, Steven P said:

So you are wanting 2 copies of the PDF, one stored locally and one in the working folder? 

 

Do you use a LISP to plot your PDFs? In which case I would simply change that, duplicate the line that actually plots the PDF and change the filepath part from local-folder to working-folder. Would that work?

 

No, the PDF has nothing to do with the drawing in AutoCAD. It is an external file that I always insert into the folder where the DWG and the drawings.PDF are saved. It is always the same PDF that I add there.

I want to automate this with command.

Link to comment
Share on other sites

1 hour ago, Steven P said:

 

I dont know were to start.

This doesnt work. Any Idea?

 

(defun c:meocopy (/ )
  (vl-file-copy "C:/Anleitung.pdf" "C:/Autodesk/Anleitung.pdf")
  (vl-cmdf "start" "C:\Autodesk\Anleitung.pdf")
  (princ)
)
(princ)

 

Link to comment
Share on other sites

Look at this example (startapp "C:/Program Files (x86)/Adobe/Acrobat Reader DC/Reader/AcroRd32.exe" filename)

 

Or do you mean 

 

(command "-pdfattch" filename pagenumber pt 1 0) 

  • Like 2
Link to comment
Share on other sites

8 hours ago, BIGAL said:

Look at this example (startapp "C:/Program Files (x86)/Adobe/Acrobat Reader DC/Reader/AcroRd32.exe" filename)

 

Or do you mean 

 

(command "-pdfattch" filename pagenumber pt 1 0) 

 

Ok i got it. You have to write the path only with double backslash \\

  • Like 1
Link to comment
Share on other sites

The forward, dbl back slashes depends a bit on file names etc if they have spaces use dbl back slashes. It is easier sometimes to just always use \\. But a syou can see / works for startapp. Yes its confusing. Dont ask about UNIX.

Edited by BIGAL
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...