PDA

View Full Version : Reactor not reacting


bowlingbrad
2005-10-26, 09:27 PM
Just changing over to 2006 from 2002 AutoCAD. After porting over the .mnl file, this layout switching reactor does not operate. It worked just fine in 2002. Could anyone please help me?

(vl-load-com)
(defun ChangedLayout (reactor layoutX /)
(setq currentlayoutname (nth 0 layoutX))
(if (= currentlayoutname "Model")
(progn
(if (= 1 (getvar "dimscale"))
(setvar "dimscale" (abs (getvar "dimlfac")))
) ;_ end of if
(setvar "ltscale" (* 0.5 (getvar "dimscale")))
) ;end progn
;else
(progn
(setvar "ltscale" 0.5)
(setvar "dimscale" 1)
) ;end progn
) ;if
;;; (IF (= NIL NO-STAMP)
(id-stamp "EDITED")
;;; ) ;_ end of IF
(princ (strcat "\nLTSCALE: "
(rtos (getvar "ltscale") 2 1)
" DIMSCALE: "
(rtos (getvar "dimscale") 2 0)
" DIMLFAC: "
(rtos (getvar "dimlfac") 2 0)
"\n"
) ;_ end of strcat
) ;_ end of princ

) ;end defun

(if (not *LayoutLTS*)
(setq *LayoutLTS*
(VLR-Miscellaneous-Reactor
nil
'((:VLR-layoutSwitched . ChangedLayout))
) ;_ end of VLR-Miscellaneous-Reactor
) ;_ end of setq
) ;if

bowlingbrad
2005-11-01, 05:11 PM
Okay, okay, I know you all have been clammoring to know what went wrong.... I moved the reactor lisp to acad2006doc.lsp and it worked.

Opie
2005-11-01, 05:32 PM
I'm glad you got it working and posted your solution.

pnorman
2005-11-01, 07:32 PM
From the help:
Warning! Do not modify the reserved acad2006doc.lsp file. Autodesk provides the acad2006doc.lsp file, which contains AutoLISP-defined functions that are required by AutoCAD. This file is loaded into memory immediately before the acaddoc.lsp file is loaded.

You should be using acaddoc.lsp which if you don't have already use notepad or wordpad or vlide to create a new one.

Do a search for acaddoc.lsp in the developer help...