Jump to content
tmelancon

Help! Need to generate LOTS of PNG files...

Recommended Posts

tmelancon

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

 

Share this post


Link to post
Share on other sites
BIGAL

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

 

 

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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