sadhu Posted March 31, 2010 Posted March 31, 2010 I have several named-views (d-1, d-2 etc 10 to 15 views ) that I print to a normal desktop printer a4 size. How can print named-views using lisp ? My named named-views were made using View>Named Views>Model views. Advice, links and suggestions are welcome. I would also like to make named_views using lisp - transferring view name and window extents directly within the routine. Names will be in a list or any suitable variable. Window extents will be obtained in some other routine. Quote
Lee Mac Posted March 31, 2010 Posted March 31, 2010 Views, like most other things in AutoCAD are stored in the View Table/Collection, eg. (tblnext "VIEW" t) (vla-get-Views <doc>) Quote
sadhu Posted April 1, 2010 Author Posted April 1, 2010 Got this far today. Can you help me with commands for printing views to a network printer ? (defun c:VIEW () (vl-load-com) (vlax-for myViews (vla-get-Views (vla-get-ActiveDocument (vlax-get-Acad-Object))) (alert (strcat "View: " (vla-get-Name myViews))) ) );defun Quote
sadhu Posted April 1, 2010 Author Posted April 1, 2010 Is it possible to "transfer" the view name to the plot command within a lisp routine ? Below, "named_view" is one of the views that I want to plot. (command "-plot" "y" ;Detailed plot configuration? "model" ;Enter a layout name or [?] <Model> "default windows system printer.pc3" ;Enter an output device name or [?] "letter" ;Enter paper size or [?] "Millimeters" ;Enter paper units [inches/Millimeters] "Portrait" ;Enter drawing orientation [Portrait/Landscape] "no" ;Plot upside down? [Yes/No] "View" ;Enter plot area [Display/Extents/Limits/View/Window] "named_view" ;View Enter view name "Fit" ;Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit] <Fit> "Center" ;Enter plot offset (x,y) or [center] <Center>: "yes" ;Plot with plot styles? "monochrome.ctb" ;Enter plot style table name "yes" ;Plot with lineweights? [Yes/No] "As displayed" ;Enter shade plot setting [As displayed/Wireframe/Hidden/Visual styles/Rendered] "N" ;Write the plot to a file [Yes/No] "n" ;changes to page setup [Yes/No] "n" ;Proceed with plot [Yes/No] ) Thought I might use the plot command to plot all views. Is there a better way to do it ? I would obtain the named views with this : (vlax-for myviews (vla-get-Views (vla-get-ActiveDocument (vlax-get-Acad-Object))) Quote
sadhu Posted April 1, 2010 Author Posted April 1, 2010 Just worked it out with this : (vla-get-Name myviews) Better solutions are welcome. Quote
Lee Mac Posted April 1, 2010 Posted April 1, 2010 Another solution would be to use the PlotConfiguration Object with: (vla-put-PlotType <obj> acView) (vla-put-ViewtoPlot <obj> (vla-get-Name <View>)) 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.