Results 1 to 4 of 4

Thread: Link a Layer State to a Layout tab

  1. #1
    Member smiller352220's Avatar
    Join Date
    2002-09
    Location
    NW Indiana
    Posts
    19

    Default Link a Layer State to a Layout tab

    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.

  2. #2
    AUGI Addict Glenn Pope's Avatar
    Join Date
    2001-05
    Location
    Austin, TX USA
    Posts
    2,201

    Default Re: Link a Layer State to a Layout tab

    Check out LoSwitch from DotSoft. This program should do what you want.
    Glenn Pope
    Civil Designer/CAD Manager
    River City Engineering
    AutoCAD Civil 3D 2011 Ver. 3
    Windows 7 Pro 64bit
    I explode MTEXT.

  3. #3
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Red face Re: Link a Layer State to a Layout tab

    Here is some VBA code 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.

  4. #4
    Member smiller352220's Avatar
    Join Date
    2002-09
    Location
    NW Indiana
    Posts
    19

    Talking Re: Link a Layer State to a Layout tab

    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!!!!!!

Similar Threads

  1. Change Layer State with Layout Tab
    By ccowgill in forum AutoLISP
    Replies: 24
    Last Post: 2011-04-20, 01:58 AM
  2. Automatically transfer Layout Layer State to Modelspace
    By smiller352220 in forum AutoCAD General
    Replies: 5
    Last Post: 2007-03-09, 07:41 PM
  3. Replies: 8
    Last Post: 2006-10-11, 07:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •