you can try ":vlr-documentToBeDestroyed" from (VLR-DocManager-reactor) on
VisualLisp or BeginQuit inVB , but it not helped
What are you trying to accomplish?
--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juh...@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332
"Tom" <sddf...@dsasdaasdf.com> wrote in message
news:AF18DCDCE36BE09A...@in.WebX.maYIadrTaRb...
Thanks in advance,
Tom
"John Uhden" <juh...@cadlantic.com> wrote in message
news:13821EEBA031F852...@in.WebX.maYIadrTaRb...
Dave P.
"Tom" <sddf...@dsasdaasdf.com> wrote in message
news:AF18DCDCE36BE09A...@in.WebX.maYIadrTaRb...
;;--------------------------------------
;; Define Tom's Drawing Reactor Function
;;
(defun @Tom_Dwg_Close (Reactor Info / cmdnames)
(setq cmdnames (strcase (getvar "cmdnames")))
;; Following is just for your testing
;; since you might build a separate-namespace VLX
(if (= (vl-doc-ref '$Tom_test_mode) 1)
(progn
(princ "\n\nPerforming @Tom_Dwg_Close")
(princ "\nCalling Reactor: ")(prin1 Reactor)
(princ "\nCalling Reactor Type: ")(prin1 (type Reactor))
(princ "\nCommand Info: ")(prin1 Info)
(princ "\nCommand Info Type: ")(prin1 (type Info))
(princ (strcat "\nCMDNAMES: " cmdnames))
)
)
;; This is what I've found to work, thought there is
;; an occasional LDD2i command that eludes me.
(if (not (wcmatch cmdnames "*COPY*,*CLIP*,*PASTE*,*INSERT*"))
;; Do what you want here.
;; I use dialog interfaces with no problem.
;; Just don't try to use (command) or (vl-cmdf).
)
;; since the drawing is closing, it's wise to remove your reactor.
(vlr-remove Tom_Dwg_Reactor)
(princ)
)
;;-------------------------------------
;; Set up Tom's Drawing Reactor
;;
(if (= (type Tom_Dwg_Reactor) 'VLR-DWG-Reactor)
(if (not (vlr-added-p Tom_Dwg_Reactor))
(vlr-add Tom_Dwg_Reactor)
)
(setq Tom_Dwg_Reactor
(vlr-dwg-reactor "Tom's Drawing Reactor"
'((:vlr-BeginClose . @Tom_Dwg_Close))
)
)
)
I haven't tested this adaptation for you, but it should work just fine.
--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juh...@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332
"Tom" <sddf...@dsasdaasdf.com> wrote in message
news:E8B635BEBD94B535...@in.WebX.maYIadrTaRb...
"John Uhden" <juh...@cadlantic.com> wrote in message
news:322F06B22C85D496...@in.WebX.maYIadrTaRb...
Here are the others you might include in your list of reaction events:
(:vlr-dwgFileOpened . @cv_end_open) ; neither of these
(:vlr-endDwgOpen . @cv_end_open) ; works (11-29-00)
(:vlr-BeginClose . @cv_drawing_close)
; (:vlr-databaseToBeDestroyed . @cv_drawing_destroy) ; removed
(03-24-01)
(:vlr-BeginSave . @cv_begin_save)
(:vlr-SaveComplete . @cv_end_save)
(:vlr-beginDwgOpen . @cv_begin_open)
Please edit the above with your own reactor function. Or, if you want to
use the same function, then insert conditional statements...
(setq Reaction (vlr-current-reaction-name))
(cond
((= Reaction :vle-beginDwgOpen)
;; do_this
)
((= Reaction :vlr-endDwgOpen)
;; do_that
)
;; etc.
)
To find out what fires the reactor, turn on the test_mode I suggested and
see what cmdname is to blame. With add-ons like LDD, it's sorta like
Forrest Gump's box o' choc'lates.
--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juh...@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332
"Tom" <no-...@sonic.net> wrote in message
news:C81C3D4A8183D418...@in.WebX.maYIadrTaRb...
You're using the wrong reactor class.
To do this reliably, you should use the vlr-docmanager-reactor.
You can use the vlr-documentCreated notification to handle
NEW and OPEN, and the vlr-documentToBeDestroyed notification
to handle closing.
--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juh...@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332
"Tony Tanzillo" <tony.t...@remove.this.caddzone.com> wrote in message
news:26996CA3437BC30C...@in.WebX.maYIadrTaRb...
Wouldn't hurt to study the help file "acad_dev.chm" either.
--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juh...@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332
"Tom" <sddf...@dsasdaasdf.com> wrote in message
news:CEF6C3B13583002F...@in.WebX.maYIadrTaRb...