Reactor vs non reactor

Discussion in 'AutoCAD' started by Adesu, Jan 11, 2005.

  1. Adesu

    Adesu Guest

    I've spend time to read about reactor,but not yet enough to satisfied,I
    don't know where we start to learn reactor ,I only want ask to others .What
    is different a program autolisp contained reactor and non reactor?
     
    Adesu, Jan 11, 2005
    #1
  2. Adesu

    Adesu Guest

    Hi Luis, I thought
    1. visual lisp reactor more higher level than visual lisp code
    2. with reactor can do anything and complex
    3. visual lisp has limited solution,visual lisp reactor unlimited solution

    or in imaginable
    1. visual lisp reactor = car with abs
    2. visual lisp = car without abs (conventional)
     
    Adesu, Jan 12, 2005
    #2
  3. Adesu

    Adesu Guest

    Chapter 7 -- Advanced Topics
    VLISP not only makes program development easier and faster, it also provides
    new functionality to AutoLISP applications. For example, you can attach
    reactors to entities in the AutoCAD drawing window, allowing your
    application to respond to user actions on these entities.
     
    Adesu, Jan 13, 2005
    #3
  4. Adesu

    Adesu Guest

    Chapter 7 -- Advanced Topics
    To add reactor functionality to your application, you first need to write a
    callback function that performs the tasks needed at the time of the reactor
    event. After you define a callback function, you link the function to an
    event by creating a reactor object


    Is it true a "callback" as "ent',and then replace "notifier-object" by "ent"

    (vl-load-com)
    (setq ss (ssget))
    (setq en (ssname ss 0))
    (setq ent (vlax-ename->vla-object en))

    For example, the following code defines a callback function named
    print-radius. This function can be used to print the radius of a circle:

    (defun print-radius (notifier-object reactor-object parameter-list)
    (vl-load-com)
    (cond ( (vlax-property-available-p notifier-object "Radius" )
    (princ "The radius is ")
    (princ (vla-get-radius notifier-object))
    )
    )
    )
     
    Adesu, Jan 17, 2005
    #4
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.