How to Cancel the command in callback functions?

Discussion in 'AutoCAD' started by Alexander V. Koshman, Dec 26, 2003.

  1. Hello!
    ----------
    Can somebody tell me is there a way to Cancel a calling Command in callback
    function to invoke some operations *before* and then to recall this Command
    again or call an another command or function?

    I just found in the NG the reply of John Uhden, with the link to his
    Cancel.lsp.
    I tried it and find that it can't cancel Plot command!

    Some other ways or I want too much? ; )


    Thank you for your good will!
     
    Alexander V. Koshman, Dec 26, 2003
    #1
  2. Alexander V. Koshman

    John Uhden Guest

    As the website advises "Note that commands such as "Quit" can not be cancelled
    as they require no further user input."
    To be more exact, there must be further command-line input in order to cancel.
    Perhaps you can accomplish what you want by undefining the "plot" and "print"
    commands, and defining custom c:plot and c:print functions.
     
    John Uhden, Dec 26, 2003
    #2
  3. John! Thank you! I will try!
     
    Alexander V. Koshman, Dec 27, 2003
    #3
  4. Alexander V. Koshman

    John Uhden Guest

    Well, you could change "(vl-cmdf) " to (chr 3), but it's the same difference, so
    yes.
     
    John Uhden, Dec 27, 2003
    #4
  5. Thak you John!
     
    Alexander V. Koshman, Dec 28, 2003
    #5
  6. Alas! John!
     
    Alexander V. Koshman, Dec 29, 2003
    #6
  7. Alexander V. Koshman

    John Uhden Guest

    Using the "redefine" method, within your c:plot function, you could direct the
    program to proceed or not with the AutoCAD plot command.
     
    John Uhden, Dec 30, 2003
    #7
  8. Oh! John!
    -----------
    I didn't understand you then!
    ....And I tryied to cancel the redefined c:plot with "(vl-cmdf) "... : (

    Defining my own PLOT I can do what I want without a doubt
    but I would prefer to make two different and independent things
    with reactors...
    ... bacause of XXI century...

    Thank you again!
     
    Alexander V. Koshman, Dec 30, 2003
    #8
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.