entity selection object reactos ?

Discussion in 'AutoCAD' started by Jesse Danes, May 11, 2004.

  1. Jesse Danes

    Jesse Danes Guest

    Is there an object reactor that triggers when one or more objects are
    selected ? In short, I have a routine which associates objects as a
    group based on their handles. I would like to have a reactor trigger
    when one of the member objects is selected (e.g. highlighted) to call
    the routine which collects all associated objects and adds them to the
    current selection set. I am familiar with most of the reactors in VL
    but there seems to be none for this particular event unless I am missing
    something ?

    BTW, I do not want to use the GROUP command as it does not handle
    members that may be on locked or frozen layers, which in my case almost
    all associated object groups have members on locked of frozen layers.


    Thanks

    Jesse Danes
     
    Jesse Danes, May 11, 2004
    #1
  2. Jesse Danes

    Jesse Danes Guest

    Thanks Luis

    I was hoping for better news, but was expecting this would be the case.
    Currently I am using something similar to the method you suggest ...

    (vlr-object-reactor "AppName" '(:)vlr-objectModfied)))

    The result is much the same as you suggest. Atleast one member must be
    modified (e.g. MOVE, STRETCH, ROTATE, etc.) and the modification event
    triggers the callback to select the associated group member objects and
    update their entity records to match the modified object (e.g. point,
    scale, rotation, etc).

    The only other thing I considered was to build specific commands for the
    application which would call all group member entities before issuing
    the associated AutoCAD command. Although I would have preferred to have
    native AutoCAD commands respond in a similar way.

    VL has come a long way, but it seems it still has some miles to go.



    Thanks

    Jesse Danes
     
    Jesse Danes, May 11, 2004
    #2
  3. Jesse Danes

    Jesse Danes Guest

    Thats actually not a bad idea at all. I try to avoid using the mouse
    reactor since its triggered so often, but this may be the only way using
    reactors. I use (nentselp) for alot of other operations as well for
    picking up application objects based on a pick point. Something you
    probably have run into using this, is that if there are two or more
    objects at the same general location of the point, sometimes the
    (nentselp pt) alone will miss the target object and fail the comparison.
    I beleive this has to do with the draworder of the objects. Here
    again more tedious workarounds, consecutively deleting each entity found
    by (nentselp) until it returns nil and testing each entity name/record
    returned, then restoring the deleted entities using a second call to
    (entdel). Although the appearance of objects dissapearing and returning
    might not be desired, one could also try consecutively locking each
    objects layer (not recommended), or resetting the drawoder of each
    object found by sending it to the back and testing for the next object
    with (nentselp). Here again tedious and not entirely reliable. Its
    always interesting to see what/if something can be accomplished purely
    with VL/AutoLISP. Its amazing what can be done using a little thought
    and enginuity.

    Thanks again for your example, I think I am going to put that to the
    test this evening and see how it works out.


    Regards,

    Jesse Danes



     
    Jesse Danes, May 11, 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.