REACTOR...Need advise!

Discussion in 'AutoCAD' started by masterbike360, Jan 17, 2005.

  1. Hi guys... I looking to create a reactor that wiil do the following:
    1-Modify the layout name. It wiil add the drawing name(not the file name) + the revision#. All those information are stores in my titleblock as attribute. So, it as react when I'm modify the attributte and when I switch to the layout.
    :)VLR-layoutSwitched) (I dont know if there's on for attribute)

    2-Modify an attribute base on the file name. I can't use rtext because I already have tons of files that have to be updated.
    Obviously this as to be done when I open the drawing.
    :)vlr-documentBecameCurrent)

    A will use my AcadDoc.lsp to store those reactor. The attribute tag prompt are exactly the same on all drawing I have to updated.
    The first reactor as to look two attribute's: DWG_NAME (CELT-01) and CURR_REV (4). Base on that he create a layout name (CELT-01_04).
    The second reactor's as to updated the DOC_NAME attribute. (JSCELT0124.dwg).

    Should I start my reactor by looking for a block than finding the right TAG PROMPT....

    (vl-load-com)
    (setq ss (ssget "X" '((0 . "INSERT") (66 . 1)))
    )
    (setq cnt 0)
    (repeat (sslength ss)
    (setq ent (ssname ss cnt)
    cnt (1+ cnt)
    )
    (setq BlkObj (vlax-ename->vla-object ent)
    AttObj (vla-getAttributes blkobj)
    AttLst (vlax-SafeArray->List (vlax-variant-value AttObj))
    )
    (foreach n AttLst
    (if (= (vla-get-tagstring n) "DOC_NAME")
    (vla-put-TextString n (getvar "dwgname"))
    )
    )
    )

    then, I'm not sure on where should I go...

    Any advise will be greatly appreciate!
    Simon
     
    masterbike360, Jan 17, 2005
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.