Mark Propst
Usenet Archive
- Joined
- May 2, 2000
- Messages
- 492
- Reaction score
- 0
For the past year or so I've been running with some globals set for the convenience of several vla routines they are loaded from a lisp file Globals.lsp which is called by acaddoc.lsp and therefore loads with each dwg. ex:
(vl-load-com)
(or *acad* (setq *acad* (vlax-get-acad-object)))
(or *doc* (setq *doc* (vla-get-activedocument *acad*))) (or *Mspace* (setq *Mspace* (vla-get-modelspace *doc*)))
etc.....
I've read on this ng about the need to destroy these objects before closing acad thus:
; Notes:
; Use a DocManagerReactor with a 'vlr-documentToBeDestroyed'-event ; to release the global objects at the end of a session - otherwise AutoCAD may crash
well, being pathologically lazy and sloppy I haven't implemented this reactor business - guess I'm more scared of reactors than wandering globals....
and of course acad does crash on occasion - it has always crashed on occasion ever since I started using around rel12 dos. - so I'm so used to that, that I can't tell any difference since I've been declaring these globals.
so the question is, do I need to get to trying to figure out that reactor doomahickey or is it not an urgent necessity????
and as I'm trying to think about these global objects, since this loads with each drawing, they are just global to the document space, not to the acad session ....is that right?
so if I have 5 drawings open I have 5 versions of *acad* and *doc*, .... is that right?
so the reactor would be defined like also in the acaddoc.lsp file or called from there so that it would be loaded in each drawing as well, .... is that right?
but a docManagerReactor I would think was an Editor reactor as opposed to a document level reactor, so maybe the above is not right?
any input on this?
tia
Mark
(vl-load-com)
(or *acad* (setq *acad* (vlax-get-acad-object)))
(or *doc* (setq *doc* (vla-get-activedocument *acad*))) (or *Mspace* (setq *Mspace* (vla-get-modelspace *doc*)))
etc.....
I've read on this ng about the need to destroy these objects before closing acad thus:
; Notes:
; Use a DocManagerReactor with a 'vlr-documentToBeDestroyed'-event ; to release the global objects at the end of a session - otherwise AutoCAD may crash
well, being pathologically lazy and sloppy I haven't implemented this reactor business - guess I'm more scared of reactors than wandering globals....
and of course acad does crash on occasion - it has always crashed on occasion ever since I started using around rel12 dos. - so I'm so used to that, that I can't tell any difference since I've been declaring these globals.
so the question is, do I need to get to trying to figure out that reactor doomahickey or is it not an urgent necessity????
and as I'm trying to think about these global objects, since this loads with each drawing, they are just global to the document space, not to the acad session ....is that right?
so if I have 5 drawings open I have 5 versions of *acad* and *doc*, .... is that right?
so the reactor would be defined like also in the acaddoc.lsp file or called from there so that it would be loaded in each drawing as well, .... is that right?
but a docManagerReactor I would think was an Editor reactor as opposed to a document level reactor, so maybe the above is not right?
any input on this?
tia
Mark