Jump to content

Recommended Posts

Hi Is there any way to export all layers separately into pdf format?
i want to export all of them at once to edit them in illustrator. It's taking alot of time to export them one by one from autocad

 

 

 I don't have any professional Experience with programming but i have tried to made this .lisp with chatGPT but it's not working to export files which property in codes needs improvements please

 

 

(defun c:ExportLayersToPDF (\Users\Useer\Desktop\pdf layers)
  (setq dwgname "EMERALD HILLS MP (2007) 25 01 2023") ; 
  (setq dwgpath "F:\Shahtaj Ahmed Bhutto\AUTOCAD") ; 
  
  (setq layname "")
  (while
    (setq layname (tblnext "LAYER" layname))
    (and layname
         (/= layname "0")
         (/= layname "DEFPOINTS")
         (/= (logand (cdr (assoc 70 (tblsearch "LAYER" layname))) 1) 1)
         (progn
           (setq pdfname (strcat dwgname "_" layname ".PDF"))
           (setq pdffullpath (strcat dwgpath pdfname))
           (command "-plot" "Yes" "Model" "" "" "DWG To PDF.pc3" "A0" "PORTRAIT" "Inches" "Fit" "Center" "No" "No" "No" "Yes" "No" "No" "Yes" "Yes" pdffullpath)
           T
         )
    )
  )
  (princ)
)

 

 

image.thumb.png.ada5f7fc502de34e8a4134a8764e0cdd.png

Edited by SLW210
Added Code Tags
Link to comment
Share on other sites

1 minute ago, SLW210 said:

Please use the <> to place your code in Code Tags. I fixed this one for you.

Tag Added Thank You so Much ❤️ For helping Brother

Link to comment
Share on other sites

17 minutes ago, SLW210 said:

Please use the <> to place your code in Code Tags. I fixed this one for you.

i have add the code in tags section 

image.thumb.png.ce2999056225c43ecdc4bb7f8c14d948.png

Link to comment
Share on other sites

18 hours ago, SLW210 said:

Please use the <> to place your code in Code Tags. I fixed this one for you.

Brother is there any update regarding .lisp layers to pdf code? for autocad

Link to comment
Share on other sites

1 minute ago, SLW210 said:

Might help to explain what's wrong with your code.

 

 

let me reshare the code i have tried to edit but it's not working 
i just want to export layers separately to pdf file.

but i did not be able to find .lisp for "layer to PDF" some how i got .lisp for  "layer to DWG"

here is the code i'm trying to make Layer to pdf .lisp

 

ExportLayersTOPDF (1).lsp

 

 

but when i run this in autocad it's giving error :( I mean it's not working

Link to comment
Share on other sites

Quick look it does not seem to have turn layers on off ?


 

(setvar 'clayer layname)

(command "-layer" "off" "*" "N" "")

plot............

(command "-layer" "on" "*"  "")

 

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