+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Forum Newbie
    Discipline
    Electrical
    Using
    AutoCAD 2014
    Join Date
    Aug 2017
    Posts
    5

    Idea Printing Customization

    Registered forum members do not see this ad.

    Hi All,

    I need help in customizing printing cad files actually in my case single drawing would have multiple sheets in single model space so it will have multiple title block is there any way to print entire region inside title block one by one by means of vba scripting? (i mean is there any way to sense outer boundary of title block in vb and set it as printing area)
    Having thousands of cad files in which work area in model space of any two drawing is not same

    thanks in advance
    Attached Files

  2. #2
    Senior Member
    Using
    AutoCAD 2009
    Join Date
    Oct 2012
    Posts
    293

    Default

    It's not a problem.
    There is a program for printing from the model - "Reverse"
    Do not forget to download the langpack.
    Link: http://www.kdmsoft.ru/reverseng.html

  3. #3
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,815

    Default

    Here is a lisp for printing all title blocks in model space you will need to change the block name and some of the size values to suit, you will need to change destination printer name and Ctb name.

    Code:
    ; plot all title blocks in model space
    ; By Alan H 
     (PROMPT ".....PRINTING DRAWING TO plotter....")
    (setq oldsnap (getvar "osmode"))
    (setvar "osmode" 0)
     : Da1drsht is titel block name
    (setq ss2 (ssget "x" '((0 . "INSERT")(2 . "Da1drsht")(410 . "Model"))))
    (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 this is lower left for this code
       (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)
    A man who never made mistakes never made anything

  4. #4
    Forum Newbie
    Discipline
    Electrical
    Using
    AutoCAD 2014
    Join Date
    Aug 2017
    Posts
    5

    Default GetBoundingBox

    Registered forum members do not see this ad.

    Thanks bigal,

    Your Lisp code is awesome & because of more functional requirements we made it in VBA and used GetBoundingBox Method to get boundary of a title block


Similar Threads

  1. Pan Customization
    By knafziger in forum AutoCAD General
    Replies: 7
    Last Post: 15th Jul 2010, 08:48 pm
  2. Right click customization??
    By desiree in forum AutoCAD General
    Replies: 4
    Last Post: 21st Dec 2009, 04:03 pm
  3. Prosteel 3d Customization
    By carry in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 2nd Mar 2009, 03:16 pm
  4. .mnu customization with LT
    By AutoCAD Slave in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 18th Apr 2008, 07:49 am
  5. customization gone bad
    By bikecad in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 6th Sep 2006, 09:08 pm

Tags for this Thread

Bookmarks

Posting Permissions

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