TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: alanjt on May 02, 2008, 10:44:07 AM

Title: linetype scale reactor not working in 2008
Post by: alanjt on May 02, 2008, 10:44:07 AM
we have a linetype scale reactor that sets our ltscale and psltscale when we switch from model to paper and vise-versa. it works fine in 06, but it is not working at all in 08. i have it loaded the same exact way it loads in 06. i have this line of code placed in our acaddoc.lsp file  "(load "ltscalereactor" "Linetypescale reactor load failed.")"

any help would be greatly appreciated.

here's the code (i did not write this, this is what they were using long before i got started worked here):

Code: [Select]
(defun ChangedLayout (reactor layout / )
  (if (= (nth 0 layout) "Model")
    (progn (setvar "ltscale" (abs (/ (getvar "dimscale") 1))))
   
    ;else
    (progn (setvar "ltscale" 1.0) (setvar "psltscale" 1))
     );if
  );
 
(if(not *LayoutLTS*) (setq *LayoutLTS* (VLR-Miscellaneous-Reactor nil
'((:VLR-layoutSwitched . ChangedLayout))))
)

(DEFUN C:mslt ()

(if (= (getvar "ctab") "Model")

(progn(setvar "ltscale" (abs(getvar "dimlfac")))(command "regenall")
)
    ;else
    (progn (setvar "ltscale" 1.0) (setvar "psltscale" 1) (command "regenall"))
     );if
  )
Title: Re: linetype scale reactor not working in 2008
Post by: Crank on May 02, 2008, 10:54:33 AM
You don't need the reactor any more: Check out the MSLTSCALE variable.
Title: Re: linetype scale reactor not working in 2008
Post by: alanjt on May 02, 2008, 01:07:52 PM
even better. i set it to 0 and all is well.
thanks.