Ahankhah Posted February 19, 2011 Posted February 19, 2011 Hello every body, is it possibleto retain reactors attached to objects in dwg file, without running a program in subsequent sessions:unsure:? Quote
Lee Mac Posted February 19, 2011 Posted February 19, 2011 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 Quote
Michaels Posted February 19, 2011 Posted February 19, 2011 Lee , What is the meaning of Reactor ? and what is the use of it in programming and in Autocad ? Thank you so much . Quote
Ahankhah Posted February 19, 2011 Author Posted February 19, 2011 Lee Mac, Thank you very much:sweat:, you must be a genius. I think even Autodesk must appreciate you very much:D. Quote
Lee Mac Posted February 19, 2011 Posted February 19, 2011 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 :wink: Quote
Recommended Posts
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.