tmelancon Posted February 20, 2020 Author Posted February 20, 2020 BIGAL I for sure thought you were on to something... I updated the LISP and ran it by itself in CAD to see if it would work and it ran with no errors, but only resulted in the last page of a 3 page drawing being printed as PNG in that directory? I feel like we are getting closer, it has something to do with repeating the plot command for each layout, that isnt working for some reason... I am still trying on my end, thank you for your continued support! [LATEST LISP] (defun c:pngh4 (/) (setq fileName (substr (getvar 'dwgname) 1 (- (strlen (getvar 'dwgname))4))) (setq folder "C:\\Users\\[USERNAME]\\Desktop\\IPAD\\TESTER\\") (setq fileName (strcat folder filename)) (setq lays (reverse (layoutlist))) (repeat (setq x (length lays)) (setvar 'ctab (nth (setq x (- x 1)) lays)) (command "-PLOT" "Y" "" "PublishToWeb PNG.pc3" "Sun hi-Res (1600.00 x 1280.00 Pixels)" "L" "N" "E" "F" "C" "Y" "acad.ctb" "Y" "N" "N" "N" filename "N" "Y") );end foreach (command "CTAB" "MODEL" "ZOOM" "ALL" "QSAVE" "CLOSE") (PRINC)) Quote
BIGAL Posted February 21, 2020 Posted February 21, 2020 Try 1 maybe remove the comment 1st the aecc……… does some odd things like no user input. Try2 (setq x (- (length lays) 1)) (while (< x 0) (setq nlay (nth x lays)) (setvar 'ctab nlay) (command "-PLOT" "Y" "" "PublishToWeb PNG.pc3" "Sun hi-Res (1600.00 x 1280.00 Pixels)" "L" "N" "E" "F" "C" "Y" "acad.ctb" "Y" "N" "N" "N" filename "N" "Y") (setq x (- x 1)) ) Quote
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.