Doubt in objecterase Event

Discussion in 'AutoCAD' started by srinivasan, Nov 5, 2004.

  1. srinivasan

    srinivasan Guest

    Hello all

    I want to erase the objects from the drawing only
    after getting the confirmation (i.e only when the
    user selects yes) other wise it should no remove the objects
    from the drawing.

    I tried with object erased method.But in both the cases it erases the objects.

    Can any one help me.

    Thanks in advance.

    Sri
     
    srinivasan, Nov 5, 2004
    #1
  2. Sri,

    Perform an UNDO if user chooses "No" option for object deletion.

    Regards,
    Maksim Sestic
     
    Maksim Sestic, Nov 5, 2004
    #2
  3. srinivasan

    VBA Guest

    Or use the BeginCommand Event checking for erase.
     
    VBA, Nov 5, 2004
    #3
  4. srinivasan

    srinivasan Guest

    Thanks for your informations.

    But i have to see whether the entity selected is
    an entity created by me ( i had attached xdata).
    Only in case if it is my entity i should prompt for
    delete yes or no.There fore i require the objects to
    be selected and this prevents me from using the begin command event.

    Any other solution.

    Bye
    Sri
     
    srinivasan, Nov 6, 2004
    #4
  5. srinivasan

    Oberer Guest

    you may also want to include a startundomark and endundomark in your routine..

    "Only in case if it is my entity i should prompt for
    delete yes or no"
    Am i understanding this correctly? Say you have 2 circles, one I created, one you created with XDATA.

    What you want is for me to erase my circle, no prompt. When i go to erase your circle, with XDATA< you want a prompt?
    if your objects are so sensitive, why not put them on a locked layer?
     
    Oberer, Nov 9, 2004
    #5
  6. srinivasan

    srinivasan Guest

    thanks for your support

    Actually i am planning to relate a corresponding label for each
    line entity i create,for which i am storing the other entity handle in the text and line.So when i delete a line created
    by me automatically i want to remove the label
    entity corresponding to it Therefore i need to check and prompt only if the entity deleted is created by me else i dont
    want to put the prompt.

    Sri
     
    srinivasan, Nov 10, 2004
    #6
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.