Which Reactor?

Discussion in 'AutoCAD' started by Nick Jacobs, Nov 2, 2004.

  1. Nick Jacobs

    Nick Jacobs Guest

    Hi Gang,
    I'm a bit confused right now... What I'm looking for is the reactor that
    will tell me when a specific block has been deleted, or modified.

    For both circumstances: I'd like to know it was deleted/modified from both
    code (entdels, entmods, etc) and from the command lines (erase, ddatte).

    I don't care about stopping the action, I just want to know that it has
    occured.

    I can trap ddatte easily enough, but that's the only one so far. I've
    trapped delete, but I can't figure out which entity was deleted, (My block,
    or a line)...

    Any ideas?

    Thanks for the help,
    Nick

    Env: XP/sp2, AC2004, Studio 2003
     
    Nick Jacobs, Nov 2, 2004
    #1
  2. Nick Jacobs

    Rudy Tovar Guest

    You'd more than likely want an editor reactor than an object reactor.

    (If (previous (selection (contains (block name....do what ever...

    editor reactor fire
    return command issued
    ssget previous selection
    compare block name
    if so - do what ever

    ; Example code...

    (vlr-editor-reactor nil '(:)vlr-commandended . what-happened)))

    (defun what-happened ( func val /)
    (setq call-fun func
    fun (car val)
    )
    (if (= fun "ERASE")
    (progn
    ;do what ever
    )
    )
    (princ)
    )
    --
    MASi
    Copyright 2004 by Cadentity
    www.Cadentity.com
    Autodesk
    Authorized Developer
     
    Rudy Tovar, Nov 2, 2004
    #2
  3. Nick Jacobs

    Jürg Menzi Guest

    Hi Nick

    Use an object reactor with this events:
    - :VLR-erased fire if the block will be deleted
    - :VLR-modified fire if the block himself will be modified
    - :VLR-subObjModified fire if an attribute will be modified
    Watch also for:
    - :VLR-unerased
    - :VLR-modifyUndone

    Cheers
     
    Jürg Menzi, Nov 3, 2004
    #3
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.