Originally Posted by
todd.mackay
All the values of concern, for all the drawings, are blank at the moment. To explain (and to use the example in my original thread), the block named "DSHEET1 (for D size)" has the typical title block attributes. Drawing Number, Drawing Title, Scale, etc. Those have values to them per drawing. The signature attributes and dates are blank. The customer had given us the go ahead to sign and date all the drawing with specific initials and dates that have been given to us.
So, the “ENGINEER” attribute tag needs a new value of “MJH (s)” ... the (s) is the electronic signature symbol that they want.
The “ENGDATE” attribute tag needs a new value of “05-28-08”
This needs to repeat a total of 11 times to different attribute tages. Then save, close and on to the next drawing.
I realize that something like VB could run as a batch for a whole directory. But I'm taking small steps and need a quick lisp code for now and deal with that after our delivery.
I'm trying to explain things clearly, forgive me if I'm leaving important stuff out.
Thanks - Todd
Well I've dubbed around with a routine that kind of works, the problem is I can't seem to make it "replace" the values, just fill them in. So if you have something in there already it adds to it.
** But if the existing value is constant and you know what it is, this will work fine.
that info just needs to be added in the routine in the "value to be replaced" spot.
Maybe someone else can help us figure out why it won't replace the current values.
This is just an example using some of your info:
Code:
(defun c:fillatt ()
(command "-attedit" "n" "n" "DSHEET1 "ENGINEER" "" "" "MJH (s)" "")
(command "-attedit" "n" "n" "DSHEET1" "ENGDATE" "" "" “05-28-08” "")
(graphscr)
(princ)
)
This one prompts you for the info on the command line (not practical for your use):
Code:
(defun c:fillatt ()
(setq ENG (getstring "\nENGINEER NAME "))
(setq DTE (getstring "\nENG DATE "))
(command "-attedit" "n" "n" "DSHEET1 "ENGINEER" "" "" ENG "")
(command "-attedit" "n" "n" "DSHEET1" "ENGDATE" "" "" DTE "")
(graphscr)
(princ)
)
I'd be interested to know why I can't get it to replace existing values, I tried wild cards (*) but it didn't work.
~shrug~