Tip 2291: Xref Block Layer Cleanup This month's top tip, Xref Block Layer Cleanup from Michael Kolomiyets, is a reactor-based solution for handling layers from xref blocks. This routine runs behind the scenes after it is loaded through the use of reactors. The goal is to add the letters "xref-" plus the block name to the start of all layers created through the inclusion of an externally referenced block. When the xref block is removed from the drawing, all the layers containing the letters "xref-" plus the block name at the beginning are removed from the drawing. This very elegant solution helps keep your layers straight and demonstrates the raw power of reactors in Visual LISP. Great job, Michael. This utility is a great example of reactor-based programming that is useful too! |