Attribute text editing
Attribute text editing
(OP)
Hi,
I have around 300 hundred drawings with attributed text on them. The attributed text contains drawing title, drawing number, revision status etc. I was wondering if it was possible to write some sort of script to automatically up-rev the drawing and then up-date the attributed text?
Cheers
Danjo
I have around 300 hundred drawings with attributed text on them. The attributed text contains drawing title, drawing number, revision status etc. I was wondering if it was possible to write some sort of script to automatically up-rev the drawing and then up-date the attributed text?
Cheers
Danjo





RE: Attribute text editing
"Whether you think that you can, or that you can't, you are usually right "
.. Henry Ford
RE: Attribute text editing
Cheers
Danjo
RE: Attribute text editing
Do you need that the text is modernized automatically?...
I made a routine so that it is modernized the date and the name of the drawing automatically every time that opens up, but I don't know if it is that what you want...
It also exists a called command RTEXT...
Un saludo de SpeedCAD... :)
CHILE
RE: Attribute text editing
(defun C:UPDATE_BLK_ATTS ()
(vl-load-com)
(setq BLKSS (ssget "X" '((2 . "YOUR_BLK_NAME_HERE")))) ;!!!!!!!!!!!!!!!!!!!!!
(setq BALENT (ssname BLKSS 0))
(setq ATTLIST
(vlax-safearray->list
(variant-value
(vla-getattributes (vlax-ename->vla-object BALENT))
)
)
)
(setq TAGNAME1 "YOUR_TAG_NAME_HERE" ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NEWATT1 "YOUR_NEW_ATT_INFO_HERE" ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
TAGNAME2 "YOUR_TAG_NAME2_HERE" ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NEWATT2 "YOUR_NEW_ATT_INFO2_HERE" ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
) ;setq
(foreach ITEM ATTLIST
(cond
((= (vla-get-tagstring ITEM) TAGNAME1)(vla-put-textstring ITEM NEWATT1))
((= (vla-get-tagstring ITEM) TAGNAME2)(vla-put-textstring ITEM NEWATT2))
) ;cond
) ;foreach
(princ)
) ;defun
"Whether you think that you can, or that you can't, you are usually right "
.. Henry Ford
RE: Attribute text editing
Thanks very much for your help
Cheers
Danjo