drowning in REACTORS (close lisp)

Discussion in 'AutoCAD' started by Matt, Jan 30, 2004.

  1. Matt

    Matt Guest

    I am overwhelmed... bleh...

    I have spent the last 4 hours trying to make heads and tails... my goal
    is simple... I want to be smarter than my CAD workers are lazy..!!

    I have a LISP routine that works perfectly, it updates my save stamp on
    command. I know about blocking the save commands, but what about when
    the user "X"s out of the program... nada... I am sure that reactors
    are the right direction.

    I would like to be able to get a better grasp, any pointers?? maybe
    somebody has an example of what I am asking for...??

    Thanks a ton in advance
     
    Matt, Jan 30, 2004
    #1
  2. here is some code I did to react to the begin save event

    ;SET UP REACTOR

    (vlr-editor-reactor nil
    '(:)vlr-beginSave . SAVE-LSTL))
    )

    ; SET UP CALLBACK FUNCTION TO SAVE LIST OF LAYERS

    (defun SAVE-LSTL (calling-reactor commandInfo / dwgname)
    (put-layer-state-in-dictionary)
    (PRINC "\nLayer state saved. Thanks for using LyrChk")
    (princ)
    )

    Now, you can sub in your code to the SAVE-LSTL function or rename that function alltogether.
    What I want to know is why I get crashes once in a while when the drawing closes.
    It is not my functions that are crashing, its like I need to release the reactor or something before the drawing
    actually closes.

    Please fill me in so both of us can use this incredibly slick capability of the vlr-editor-reactor function.


    Matt <>
    |>I am overwhelmed... bleh...
    |>
    |>I have spent the last 4 hours trying to make heads and tails... my goal
    |>is simple... I want to be smarter than my CAD workers are lazy..!!
    |>
    |>I have a LISP routine that works perfectly, it updates my save stamp on
    |>command. I know about blocking the save commands, but what about when
    |>the user "X"s out of the program... nada... I am sure that reactors
    |>are the right direction.
    |>
    |>I would like to be able to get a better grasp, any pointers?? maybe
    |>somebody has an example of what I am asking for...??
    |>
    |>Thanks a ton in advance

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Jan 31, 2004
    #2
  3. Matt

    Mike Burke Guest

    James,

    According to the help docs, that nil argument can be set to non-nil.
    Would you know what happens if you set it to a non-nil value? And what
    type of variable should be used - string, interger, real??

    Cheers
    Mike
     
    Mike Burke, Feb 1, 2004
    #3
  4. The help file did not help me on that.
    I have no idea what the data param is but I have a feeling you could find out by looking at the garden path example in
    the vlisp tutorial.
    Sorry for such a lousy answer.

    Mike Burke <>
    |>James,
    |>
    |>According to the help docs, that nil argument can be set to non-nil.
    |>Would you know what happens if you set it to a non-nil value? And what
    |>type of variable should be used - string, interger, real??
    |>
    |>Cheers
    |>Mike
    |>
    |>On Fri, 30 Jan 2004 16:02:31 -0800, James Maeding
    |>
    |>>here is some code I did to react to the begin save event
    |>>
    |>>;SET UP REACTOR
    |>>
    |>>(vlr-editor-reactor nil
    |>> '(:)vlr-beginSave . SAVE-LSTL))
    |>>)

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Feb 2, 2004
    #4
  5. Matt

    Mike Burke Guest

    If I found out any useful information I will post the info here.
    Thanks.
    Mike
     
    Mike Burke, Feb 2, 2004
    #5
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.