Jump to content

Lisp for Plot previous with window selection


Recommended Posts

Posted

Can anyone please create lisp for Plot Previous with window Selection, i need this urgent.

 

for lisp.jpg,

 

i have these frames ansd i want create PDF each frame Separate,

Posted

Gkumar0231 start a new post and delete this one, like others I have the answer I think but you must ask in the correct way not just add to a post. The administrator will soon sort this out.

Posted

Assuming your last plot was succesfull and you are in paperspace :

 

 



;(command PlotCommand DetailedPlot LayoutName PrinterName PaperSize PlotUnits Orientation
;   PlotUpsideDown PlotArea 1stCorner 2ndCorner PlotScale PlotOffset
;   PlotWithStyles PlotStyleName PlotWithLineWeights ScaleLineWeight PlotPaperSpaceFirst
;   HidePaperspaceObjects WritePlotToFile SaveChangesToTab ProceedWithPlot)
(defun c:plot_pw ( / 1stCorner 2ndCorner)
 (while (and (setq 1stCorner (getpoint "\nEnter 1st corner : "))
      (setq 2ndCorner (getcorner 1stCorner "\nEnter 2nd corner : ")))
 (command "-plot" "y" "" "" "" "" ""
   "" "window" 1stCorner 2ndCorner "" ""
   "" "" "" "" ""
   "" "" "" "")))

 

 

gr. Rlx

Posted

This is a model space version same applies in a layout it will find all title blocks and plot them. Me personally 1 title block per layout.

 

A quick and dirty use CHSPACE and the code below will work once you set the correct block name and sheet size etc.

 

(PROMPT ".....PRINTING DRAWING TO plotter....")
(setq oldsnap (getvar "osmode"))
(setvar "osmode" 0)

(setq ss2 (ssget "x" '((0 . "INSERT")(2 . "Da1drsht")(410 . "Model")))) ; da1drsht is the name of the title block 410 is the space 
; for this post remove the (410 . "Model") 
; and have a (if (/= "model" (getvar "ctab"))  
(setq n (sslength ss2)) 
(setq index 0)
(repeat n
   (setq en (ssname ss2 index))
   (setq el (entget en))
   (setq inspt (assoc 10 el)) ; insertion pt
  (setq xmin (- (cadr inspt) 6.0))
  (setq ymin (- (caddr inspt) 6.0))
  (setq xymin (strcat (rtos xmin 2 1) "," (rtos ymin 2 1)))
  (setq xmax (+ xmin 813.0)) ; hard coded for 813 wide 6mm offset
  (setq ymax (+ ymin 566.0)) ;hard coded for 566 high
  (setq xymax (strcat (rtos xmax 2 1) "," (rtos ymax 2 1)))

 (COMMAND "-PLOT"  "Y"     "" "//PRODPRN01/Design-5100"
       "A3" "M"     "LANDSCAPE"   "N"
       "W"   xymin   xymax "1=2"  "C"
       "y"   "Designlaser.ctb"      "Y"   "" "n"   "n"
       "y" 
   )

 (setq index (+ index 1))
)
(setvar "osmode" oldsnap)
(princ)

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