View Full Version : Link a Layer State to a Layout tab
2004-06-09, 06:06 PM
Is there a way in AutoCAD 2002 to link the layer states to the layout tab so when you switch layout tabs the layer state also changes. I know it can be done in ADT 3.3 but I don’t know how or if it can be done in AutoCAD 2002. Any help would be grateful.
2004-06-09, 06:14 PM
Check out LoSwitch from DotSoft (http://www.dotsoft.com/loswitch.htm). This program should do what you want.
2004-06-09, 06:57 PM
Here is some VBA code (http://forums.augi.com/showthread.php?p=27442#post27442) that you can use also. It will work with 2004 and up. It may work on 2002, but the line:
Set LSMan = GetInterfaceObject("AutoCAD.AcadLayerStateManager.16")
will need to be changed to:
Set LSMan = GetInterfaceObject("AutoCAD.AcadLayerStateManager.15")
Also, I know there were layout regen problems with some version of AutoCAD, but I cannot remember if it was 2002 or not. If AutoCAD 2002 crashes when you switch layouts, then don't use my code, or remove the line:
If LStateExists(LSMan, Name) Then ThisDrawing.Regen (acAllViewports)
which will disable the automatic regen, but avoids the crash.
2004-06-10, 04:16 PM
Thanks gpope....the LoSwitch works GREAT and the guys in the office just love that I found it......You made me look like a STAR!!!!!!
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.