Jump to content
selvamani

Printing Customization

Recommended Posts

selvamani

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

Drawing2.dwg

Share this post


Link to post
Share on other sites
maratovich

It's not a problem.

There is a program for printing from the model - "Revers"

https://www.kdmsoft.net/revers.html

Edited by maratovich

Share this post


Link to post
Share on other sites
BIGAL

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.

 

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

Share this post


Link to post
Share on other sites
selvamani

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

 

:D:D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×