Author Topic: Could it be possible to write reactors using Autolisp?  (Read 3318 times)

0 Members and 1 Guest are viewing this topic.

Pepe

  • Newt
  • Posts: 87
Could it be possible to write reactors using Autolisp?
« on: December 15, 2008, 12:53:42 PM »
I mean, not only reactors, but functions able to stand by stealthily (it's the right word?) wainting for events. And if so, how?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Could it be possible to write reactors using Autolisp?
« Reply #1 on: December 15, 2008, 01:19:11 PM »
Pepe there are many lisp reactor examples here at the swamp. :)
http://www.theswamp.org/index.php?topic=26380.0
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Pepe

  • Newt
  • Posts: 87
Re: Could it be possible to write reactors using Autolisp?
« Reply #2 on: December 15, 2008, 02:26:59 PM »
Thank you for answer, CAB.

I think I was misunderstood (probably my poor, rusty english). I know I can use reactors in Autolisp, but I mean if I can write new types of reactors using Autolisp (not using 'VLR-s').

As far as I know, reactors are stand by functions waiting steathily (I insist  :roll:, It's that the right word?) for events, and I only can use Autolisp for 'one target' (I just can't find them another name :oops:) applications. So, lets suppose I want to write a new reactor that fires only if, let's say, anyother variable than the ones controlled by VLR-SYSVAR-REACTOR, changes, or a stealth function written in Autolisp that beeps if it's 12 o'clock while i'm working with autocad.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Could it be possible to write reactors using Autolisp?
« Reply #3 on: December 15, 2008, 02:42:28 PM »
All you have to work with are the built in reactors.
You can get creative with the reactors you have to work with & do most things.
You may have more options with other programing languages line NET but I'm not familiar enough to
comment on them.

For an alarm clock you could use a combinations of reactors which look up the time on each call
to them. The same can be true for a variable that is not watched by the VLR-SYSVAR-REACTOR.
The potential to slow down ACAD is there but if you function were small and fast it would work.
You just have to use your imagination to find a solution.  :-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.