Shahtaj Bhutto Posted June 6, 2023 Share Posted June 6, 2023 (edited) 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) ) Edited June 6, 2023 by SLW210 Added Code Tags Quote Link to comment Share on other sites More sharing options...
SLW210 Posted June 6, 2023 Share Posted June 6, 2023 Please use the <> to place your code in Code Tags. I fixed this one for you. 1 Quote Link to comment Share on other sites More sharing options...
Shahtaj Bhutto Posted June 6, 2023 Author Share Posted June 6, 2023 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 Quote Link to comment Share on other sites More sharing options...
Shahtaj Bhutto Posted June 6, 2023 Author Share Posted June 6, 2023 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 Quote Link to comment Share on other sites More sharing options...
Shahtaj Bhutto Posted June 6, 2023 Author Share Posted June 6, 2023 45 minutes ago, SLW210 said: Please use the <> to place your code in Code Tags. I fixed this one for you. here is the link to coding from chatGPT https://chat.openai.com/share/9f32cc2e-e553-4c33-b42b-1ea50ba74611 Quote Link to comment Share on other sites More sharing options...
Shahtaj Bhutto Posted June 7, 2023 Author Share Posted June 7, 2023 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 Quote Link to comment Share on other sites More sharing options...
SLW210 Posted June 7, 2023 Share Posted June 7, 2023 Might help to explain what's wrong with your code. 1 Quote Link to comment Share on other sites More sharing options...
Shahtaj Bhutto Posted June 7, 2023 Author Share Posted June 7, 2023 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 Quote Link to comment Share on other sites More sharing options...
SLW210 Posted June 7, 2023 Share Posted June 7, 2023 What exactly is the error? You could run the "Layers to DWG" LISP and then batch plot them to PDFs. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 7, 2023 Share Posted June 7, 2023 Quick look it does not seem to have turn layers on off ? (setvar 'clayer layname) (command "-layer" "off" "*" "N" "") plot............ (command "-layer" "on" "*" "") Quote Link to comment Share on other sites More sharing options...
Joakin1 Posted October 18 Share Posted October 18 Hi, is it possible to get that lisp to print each layer in a different pdf? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.