ryan osmun Posted March 14, 2014 Posted March 14, 2014 i design pools, i am trying to find a way to have the title block for each company automatic populate from say a program like MAS. is there anyway to have CAD pull inforamtion from another program to auto populate a title block? i design for about 20 different companies a day so not having to fill out a new title block for every design would be very time saving. thanks! Quote
Ski_Me Posted March 14, 2014 Posted March 14, 2014 Depends on the information you want to bring in. Most of the time your going to use a link to a spreadsheet that contains the information you want. But that's a lot of work you have to do before hand and then you have to insure the information in your spreadsheet is correct. What your thinking about is more for importing information on parts from a data sheet. I would suggest creating a base title block, then when you do a drawing for one of the companies you design for put in all their information in the title block and save it as a template. It's the same amount of work you would have done anyway trying to link or import from an external source. I've never used MAS but I don't think you could link to it anyway and I'm not sure you would want too you might do something that could bring it down. Might lose a crap load of invoices then where would you be. Sitting outside cause they turned off the power, cause you couldn't pay the electric bill all due to the fact you wanted to make it easier to use autocad. Not worth it my friend. Quote
BIGAL Posted March 14, 2014 Posted March 14, 2014 You can auto populate multiple title blocks with info including x of total sheets which is handy but this can be done also using sheet sets. Bottom line is you have to enter all the info somewhere, our title block has around 15 items, Like Ski_me I would create a template and just copy each layout. If you have different layouts that have certain info create those layouts as well you can have as many layout title blocks a you like. Here is example of updating a few attributes of multiple title blocks. ; changes to issued for construction : thanks to lee mac for original code (vl-load-com) ; 1. Get current date in mm/dd/yy format. (defun ddmmyy (/ x today) (setvar "cmdecho" 0) (setq x (getvar "CDATE")) ; get current date (setq today ( rtos x 2 4)) ; convert to a string (setq date (strcat (substr today 7 2) "." (substr today 5 2) "." (substr today 3 2) )) ) (setq oldtag1 "DRAWING_STATUS") ;attribute tag name (setq newstr1 "ISSUED FOR CONSTRUCTION") (setq oldtag2 "REV_NO") ;attribute tag name (setq newstr2 "0") (setq ss1 (ssget "x" '((0 . "INSERT") (2 . "DA1DRTXT")))) (setq inc (sslength ss1)) (repeat inc (foreach att (vlax-invoke (vlax-ename->vla-object (ssname SS1 (setq inc (1- inc)) )) 'getattributes) (if (= oldtag1 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr1) ) ; end if (if (= oldtag2 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr2) ) ; end if ) ; end for ) ;end repeat (setq oldtag1 "REV-NO") (setq newstr1 "0") (ddmmyy) (setq oldtag2 "DATE") (setq newstr2 date) (setq oldtag3 "AMENDMENT") (setq newstr3 "ISSUED FOR CONSTRUCTION") (setq ss2 (ssget "x" '((0 . "INSERT") (2 . "REVTABLE")))) (setq inc (sslength ss2)) (repeat inc (foreach att (vlax-invoke (vlax-ename->vla-object (ssname ss2 (setq inc (1- inc)))) 'getattributes) (if (= oldtag1 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr1) ) (if (= oldtag2 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr2) ) (if (= oldtag3 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr3) ) ) ) (setq ss1 nil) ; (setq ss2 nil) (princ) Quote
Recommended Posts
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.