Results 1 to 2 of 2

Thread: Layouts in Paper Space based on Model Space blocks

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2010-10
    Posts
    1
    Login to Give a bone
    0

    Default Layouts in Paper Space based on Model Space blocks

    Hi ... I am new here, so I hope I am posting this on the right place.

    I need your help creating a 'macro' to read all the 'LAYOUT_AA' blocks in model space and create a paper space layout for each.
    I also need each layout to be rename based on the PAGE attribute of the LAYOUT_AA block
    it will be nice if a numeric order is maintained. the PAGE attribute is always a number.

    the attached drawing show the end result, but the problem is sometime i have 100's of those layouts and I am looking for a better way of doing this.
    Attached Files Attached Files

  2. #2
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    0

    Default Re: Layouts in Paper Space based on Model Space blocks

    Me personally it looks like your drawing in model space but wanting to plot the same thing from Model space so if you want cut out the step this will plot all title blocks in model space it just finds them. I would just put a text or block and find it to work out say center of object, then have the layout created correct name insert correct title block or xref and populate. You can also as create do stuff like scale etc.

    Code:
     ; plot all title blocks in model space
    ; by Alan H 2013
     (PROMPT ".....PRINTING DRAWING TO plotter....")
    (setq oldsnap (getvar "osmode"))
    (setvar "osmode" 0)
     
    (setq ss2 (ssget "x" '((0 . "INSERT")(2 . "Da1drsht")(410 . "Model")))) ; 2 is title block name
    (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 code 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)

Similar Threads

  1. Replies: 8
    Last Post: 2015-06-01, 07:10 PM
  2. Replies: 2
    Last Post: 2014-02-18, 01:25 AM
  3. Replies: 2
    Last Post: 2010-03-23, 07:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •