Jump to content

Recommended Posts

Posted

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.

Posted

Views, like most other things in AutoCAD are stored in the View Table/Collection, eg.

 

(tblnext "VIEW" t)

(vla-get-Views <doc>)

Posted

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

Posted

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

Posted

Just worked it out with this :

(vla-get-Name myviews)

 

Better solutions are welcome.:)

Posted

Another solution would be to use the PlotConfiguration Object with:

 

(vla-put-PlotType <obj> acView)
(vla-put-ViewtoPlot <obj> (vla-get-Name <View>))

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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