Jump to content

Recommended Posts

  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

  • tive29

    11

  • FranknBeans

    8

  • BIGAL

    6

  • SLW210

    1

Posted

Sorry I am a little confused now what you want the lisp to do. You want no intervention from the user but you want the lisp to create a folder, is the location not the same every time? Your first post asked to save in D:\pdf\ or documents so I thought the location must exist already.

BIGAL has posted code that will create a folder automatically if that is what you need.

Posted

does this work for you?

(BIGAL's code with a small typo fix)

(defun c:pp ( / dwgpre pdfname ) 
(setq dwgpre (strcat (getvar "dwgprefix") "pdf\\"))
(if (= (vl-file-directory-p dwgpre) nil)
(vl-mkdir dwgpre)
)
(setq pdfname (strcat dwgpre [color=red](getvar "dwgname")[/color] "-" (getvar "ctab") ".pdf" ))

(command "tilemode" "0") 
(command "-plot" "y" "" "Dwg To PDF.pc3" "ISO expand A4 (210.00 x 297.00 MM)" "M" "P" "N" "W" "" "" "1:1" "C" "Y" "Myplotstyle.ctb" "Y" "N" "N" "N" pdfname "N" "Y")
)

Posted

Thanks FranknBeans. It works now. :D

 

does this work for you?

(BIGAL's code with a small typo fix)

(defun c:pp ( / dwgpre pdfname ) 
(setq dwgpre (strcat (getvar "dwgprefix") "pdf\\"))
(if (= (vl-file-directory-p dwgpre) nil)
(vl-mkdir dwgpre)
)
(setq pdfname (strcat dwgpre [color=red](getvar "dwgname")[/color] "-" (getvar "ctab") ".pdf" ))

(command "tilemode" "0") 
(command "-plot" "y" "" "Dwg To PDF.pc3" "ISO expand A4 (210.00 x 297.00 MM)" "M" "P" "N" "W" "" "" "1:1" "C" "Y" "Myplotstyle.ctb" "Y" "N" "N" "N" pdfname "N" "Y")
)

Posted

ha! all credit to BIGAL, it seems he knew what you wanted minutes after your first post :)

Glad you got there in the end though

Posted
ha! all credit to BIGAL, it seems he knew what you wanted minutes after your first post :)

Glad you got there in the end though

 

Thanks for putting it together as I would not have been able to do that.

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...