×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Attribute text editing

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

RE: Attribute text editing

Are you looking to do it with script or vba. It can be done either way?

"Whether you think that you can, or that you can't, you are usually right "
.. Henry Ford

RE: Attribute text editing

(OP)
Script file would be sorted...

Cheers
Danjo

RE: Attribute text editing

Hi Bot1357...

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

I am not sure what knowledge you have already (of programming), but you can call this LISP within the script to change your attributes.

(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

(OP)
Superb lads

Thanks very much for your help

Cheers
Danjo

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources