Jump to content

Recommended Posts

Posted

Hello every body,

 

is it possibleto retain reactors attached to objects in dwg file, without running a program in subsequent sessions:unsure:?

Posted

You have two options:

 

1) Store information associated with the reactor in a drawing dictionary or object xData and rebuild transcient reactors upon loading the reactor callback functions.

 

2) Use persistent reactors.

 

I would strongly advise against the second since I have always been advised by other more experienced programmers to avoid the use of persistent reactors where possible as they can be troublesome.

 

In either case, you would still need to load the associated call-back functions in every session (and hence such call-back functions would need to be sent with the drawings and loaded should you wish for the reactor functionality to remain when the drawing is opened by a third party - of course, many would be reluctant to run such code).

 

In my opinion, reactors have their place and are useful for aiding many drawing procedures (such as setting the correct layer for certain objects, or setting a specific system variable), however, they can be messy when tied into the integrity of the drawing itself. They require a lot of code to create a program that accounts for every eventuality - and even then, I would never be confident that such a program is completely bullet-proof. Of course, I had to attempt to create such a program (example here) to discover the difficulty of doing so.

 

Lee

Posted

Lee , What is the meaning of Reactor ? and what is the use of it in programming and in Autocad ?

 

Thank you so much .

Posted

Lee Mac,

Thank you very much:sweat:,

you must be a genius. I think even Autodesk must appreciate you very much:D.

Posted
Lee , What is the meaning of Reactor ? and what is the use of it in programming and in Autocad ?

 

This should provide an introduction:

 

http://www.afralisp.net/visual-lisp/tutorials/reactors-part-1.php

 

Lee Mac,

Thank you very much:sweat:,

 

You're welcome Ahankhah :)

 

you must be a genius. I think even Autodesk must appreciate you very much:D.

 

Well, I'm not sure about 'genius', I just spend too long on these forums :ouch: :wink:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...