Author Topic: Using reactors  (Read 2148 times)

0 Members and 1 Guest are viewing this topic.

iliekater

  • Guest
Using reactors
« on: March 21, 2009, 04:24:37 PM »
I just found out about reactors and I liked the whole idea . However I got sad when I read that I can only save the reactor in the drawing , not the call back fuction too . Is it so ? In that case it's quite pity ...

gskelly

  • Newt
  • Posts: 185
Re: Using reactors
« Reply #1 on: March 22, 2009, 07:33:28 AM »
You should read more about persistent reactors I think. But reactors are still well down on my list of thins to learn  :-)
Bricscad v12

KewlToyZ

  • Guest
Re: Using reactors
« Reply #2 on: March 22, 2009, 07:34:04 PM »
The reactors I have looked at within these great forums serve some fairly powerful tool functions.
I have adopted quite a few. I am just curious what purpose you are looking for that negates their use for your need?

iliekater

  • Guest
Re: Using reactors
« Reply #3 on: March 24, 2009, 02:26:42 AM »
Yes , I know that persistent reactors can be saved in the drawing , but I'd like to save the callback functions too . In this way the user should not bother loading them by himself .

gskelly

  • Newt
  • Posts: 185
Re: Using reactors
« Reply #4 on: March 24, 2009, 08:00:18 AM »
Ah, in that case I also have a saved link to http://www.theswamp.org/index.php?topic=6870.0 that may help you... but as I said I have much to learn before tackling reactors so I may not understand what you are looking for  :|
Bricscad v12

iliekater

  • Guest
Re: Using reactors
« Reply #5 on: March 28, 2009, 02:05:00 PM »
Well , what I want is to display a greeting message when the user opens the file . I intend to do this with the ALERT function , becouse I think there is no way to use a VBA (if there is any , please tell me) .
Reading the topic you showed me , I beleive the user should also have the ability to remove that . I quess another function could simply unload the reactor . But as long as I can't save the functions within the drawing , I can't call them back for me ...

mkweaver

  • Bull Frog
  • Posts: 352
Re: Using reactors
« Reply #6 on: March 28, 2009, 03:18:41 PM »
Quote
...there is no way to use a VBA (if there is any , please tell me)...
Take a look at the vbastmt command.

This code is un-tested.
Code: [Select]
(SETQ message "set linetype to bylayer?"
  buttons vlax-VBYesNo
  title "bylayer"
)

(command "vbastmt"
  (strcat "ThisDrawing.SetVariable \"USERI2\", "
    "MsgBox \(\""
    message
    "\","
    (itoa buttons)
    ",\""
    title
    "\"\)"
  )
)