pmxcad Posted March 20, 2012 Share Posted March 20, 2012 Hello again, I have a script to plot al the layouts in a drawingfile. Is there also such a script to plot al the named views in a drawing? The name of the views are different for each drawing. Thanks, PMXCad PLOT ALL LAYOUTS 2 PDF A3.scr Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 20, 2012 Share Posted March 20, 2012 I moved this to the The CUI, Hatches, Linetypes, Scripts & Macros forum. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 21, 2012 Share Posted March 21, 2012 (edited) Pmxcad can you post your script as code please keeps trying to run it rather than open to look. Anyway I am sure this question has been asked before, if you search for the auto plot lisp examples I know I posted to do layouts, but the only change to the code would be to retrieve the views table info instead of layouts and step through them. Try this (vl-load-com) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (vlax-for lay (vla-get-Views doc) (setq plotabs (cons (vla-get-name lay) plotabs)) ) Edited March 22, 2012 by BIGAL Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 22, 2012 Share Posted March 22, 2012 Please read the CODE POSTING GUIDELINES. Quote Link to comment Share on other sites More sharing options...
pmxcad Posted March 22, 2012 Author Share Posted March 22, 2012 (foreach lay (layoutlist) (setvar "CTAB" lay) (command "PSPACE" "ZOOM" "E" "_PLOT" "Y" "" "DWG TO PDF" A3"" "M" "LANDSCAPE" "N" "E" "FIT" "" "Y" "Grayscale" "Y" "N" "N" "N" "" "N" "Y" )) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 23, 2012 Share Posted March 23, 2012 Take your code and for views as per above example but replace the "E extents" with a "V" and the lisp variable to follow for the view name just do manually to get correct Y N etc Enter plot area [Display/Extents/Limits/View/Window] : V Quote Link to comment Share on other sites More sharing options...
pmxcad Posted March 24, 2012 Author Share Posted March 24, 2012 No sorry Bigal. This is not wat i like to have. I like to have a script look like the script in my post, but for the use of all the (named)views in a drawing. The script i use for plotting all the layouts, makes a sort of list from all the layouts. Iàm not into lisp and so i don`t know how to do rebuild it for the use for all the named views in a drawing, model or paperspace. I do know how to plot the views with the help of a script and give in the name of a named-view. But i`ve got a lot of drawings with named-views and they don`t have the same names. Thanks, PmxCAD Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 26, 2012 Share Posted March 26, 2012 This is lisp not script it just needs a tweak to do what you want, wheres the code for (layoutlist) (foreach lay (layoutlist) (setvar "CTAB" lay) (command "PSPACE" "ZOOM" "E" "_PLOT" "Y" "" "DWG TO PDF" A3"" "M" "LANDSCAPE" "N" "E" "FIT" "" "Y" "Grayscale" "Y" "N" "N" "N" "" "N" "Y" )) Quote Link to comment Share on other sites More sharing options...
pmxcad Posted March 26, 2012 Author Share Posted March 26, 2012 I thought it has the SCR extention so is a script. I think i was wrong. I'am only looking for a script or lisp to plot al the named views in a drawing, both model or layout. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 27, 2012 Share Posted March 27, 2012 Scripts can run lisps rename it to plotviews.lsp then use (load "plotviews") there is no extra script code in this posted example. Again post (layoutlist) so we can help it may be autoloaded. Quote Link to comment Share on other sites More sharing options...
pmxcad Posted March 27, 2012 Author Share Posted March 27, 2012 Fire, acces, cctv, security, evacuation. But is not always like this. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 28, 2012 Share Posted March 28, 2012 Ok understand by putting (layoutlist) you were implying this is a lisp Function rather than a list of view names, give this a try not tested, copy and paste to notepad save as plotviews.lsp then appload it. vl-load-com) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (vlax-for lay (vla-get-Views doc) (setq plotabs (cons (vla-get-name lay) plotabs)) ) (foreach lay plotab(setvar "CTAB" lay) (command "PSPACE" "ZOOM" "E" "_PLOT" "Y" "" "DWG TO PDF" A3"" "M" "LANDSCAPE" "N" "V" "FIT" "" "Y" "Grayscale" "Y" "N" "N" "N" "" "N" "Y" ))(princ) Quote Link to comment Share on other sites More sharing options...
pmxcad Posted March 28, 2012 Author Share Posted March 28, 2012 Fire,tgc,cctv,safety,......but is not for all the drawings Quote Link to comment Share on other sites More sharing options...
pmxcad Posted March 29, 2012 Author Share Posted March 29, 2012 Gifs an error: error: extra right paren on input Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 30, 2012 Share Posted March 30, 2012 Said it was not tested good time to learn lisp extra right paren means its missing a ( or ) also change plotabs to plotab have a lok at the first line my typo 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.