TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: hmspe on January 03, 2009, 01:58:40 PM

Title: Layiso settings in lisp
Post by: hmspe on January 03, 2009, 01:58:40 PM
Is there a system variable for settings in Layiso?  I'd like to add a line to me startup lisp to force "off" mode rather than "fade" mode, but so far I haven't been able to find the variable name for this. 

TIA.

Martin
Title: Re: Layiso settings in lisp
Post by: Andrea on January 03, 2009, 02:02:05 PM
Code: [Select]
(command "._layiso" "_S" "_OFF" "_OFF" "" )
Title: Re: Layiso settings in lisp
Post by: hmspe on January 04, 2009, 06:25:24 PM
Thanks, Andrea.  I was hoping that there was a variable exposed so that I could check which mode was active and also to be able to set the variable without using "command".
Title: Re: Layiso settings in lisp
Post by: Andrea on January 04, 2009, 07:26:06 PM
well...
as I know...Layiso was on ExpressTools previoulsy..
and now is part of AcLayerApps.arx.

I think is a environnement variable, maybe in registry there is something on for that.
Title: Re: Layiso settings in lisp
Post by: Crank on January 04, 2009, 11:10:24 PM
I think the variable is LAYLOCKFADECTL , but I can't test this right now.
Title: Re: Layiso settings in lisp
Post by: hmspe on January 04, 2009, 11:31:32 PM
Thanks for the suggestions.

In case anyone wants to know, I did not find a variable, but I did find a registry setting.  Here's what I came up with to read the value.

Code: [Select]
(defun getreg ( / HKCU)
  (vl-load-com)
  (setq HKCU (strcat "HKEY_CURRENT_USER\\" (vlax-product-key))
        HKCU (strcat HKCU
                     "\\Profiles\\"
                     (getvar 'cprofile)
                     "\\Dialogs\\Layertools\\"
             )
  )
  (print (vl-registry-read HKCU "ISO_Vpfreeze"))
)

A value of 2 is "lock and fade".  A value of 0 is "off".   

Martin
Title: Re: Layiso settings in lisp
Post by: CAB on January 04, 2009, 11:36:14 PM
Thanks Crank,
I found this
 LAYLOCKFADECTL  (http://74.125.47.132/search?q=cache:p1rI3OqMivQJ:www.kxcad.net/autodesk/autocad/AutoCAD_2008_Command_Reference/d0e142426.htm+LAYLOCKFADECTL&hl=en&ct=clnk&cd=4&gl=us)
Title: Re: Layiso settings in lisp
Post by: hmspe on January 05, 2009, 09:49:30 AM
As far as I can tell LAYLOCKFADECTL does not do the same thing as the "off" setting for LAYISO.  The off setting apparently returns to the pre-2007 (I think, not completely sure when the fade capability was added) operation where the unwanted layers were completely off.  In off mode trim and extend do not see entities on the non-isolated layers.  In 'lock and fade' mode trim and extend do see the entities that are faded and trim or extend to those entities.

Martin
Title: Re: Layiso settings in lisp
Post by: Andrea on January 05, 2009, 11:07:15 AM
Thanks for the suggestions.

In case anyone wants to know, I did not find a variable, but I did find a registry setting.  Here's what I came up with to read the value.

Code: [Select]
(defun getreg ( / HKCU)
  (vl-load-com)
  (setq HKCU (strcat "HKEY_CURRENT_USER\\" (vlax-product-key))
        HKCU (strcat HKCU
                     "\\Profiles\\"
                     (getvar 'cprofile)
                     "\\Dialogs\\Layertools\\"
             )
  )
  (print (vl-registry-read HKCU "ISO_Vpfreeze"))
)

A value of 2 is "lock and fade".  A value of 0 is "off".   

Martin

Ha !  there it is...
I known it was on registry somewhere..  :wink:

thanks Martin.
Title: Re: Layiso settings in lisp
Post by: mkweaver on May 28, 2009, 09:46:49 AM
Thanks for the suggestions.

In case anyone wants to know, I did not find a variable, but I did find a registry setting.  Here's what I came up with to read the value.

Code: [Select]
(defun getreg ( / HKCU)
  (vl-load-com)
  (setq HKCU (strcat "HKEY_CURRENT_USER\\" (vlax-product-key))
        HKCU (strcat HKCU
                     "\\Profiles\\"
                     (getvar 'cprofile)
                     "\\Dialogs\\Layertools\\"
             )
  )
  (print (vl-registry-read HKCU "ISO_Vpfreeze"))
)

A value of 2 is "lock and fade".  A value of 0 is "off".   

Martin

...and a value of 1 is "off" with "viewport layer freeze" in paperspace viewports.

Thanks, Martin!

Mike