[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Apply Layer States Automatically
Tip# 3441 By Andrew Maser On 10-Jun-2010
Rated By 1 users Downloaded : 394
Categories : Paper Space, Layer States
Software type : AutoCAD 2011
Rename File To : LaySwitch/.DS_Store,LaySwitch/Autoload.lsp,LaySwitch/Class1.vb,LaySwitch/LaySwitch.dll,LaySwitch/
Apply a layer state each time you switch layouts.

Editor's Note: In July 2010, this tip was updated with a new ZIP file that corrects a mistake and includes updates to the DLL and source code files. 

Repeat contributor Andy Maser has submitted the first .NET tip to Cadalyst's CAD Tips library! This routine adds an event handler that will apply a layer state with the same name as the layout each time you switch layouts. If no matching layer state is found, however, then no action is taken. For example, if you switch to a layout named "SITEPLAN," and a layer state named "SITEPLAN" exists, then it will be applied to this layout. .NET routines are compiled to a DLL file, which can be loaded using the NetLoad command. However, Andy has provided a LISP file to load the .NET routine and start the event handler. All you have to do is edit the LISP file and change the path to the DLL file. Andy's source code is also included.


Average Rating:

User comments