[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.
Tip 2221: Copy Objects to Layer
Tip# 2221 By Theodorus Winata On 01-Jul-2007
Rated By 1 users Downloaded : 622
Categories : Layer Properties, Layer Manager, Layers, Layer Tools
Software type : AutoCAD
Rename File To : Tip 2221: CPL.lsp
Program copies the selected entities to the layer you select from the layer list or matches layer from object you pick.

Tip 2221: Copy Objects to Layer
Theodorus Winata wrote Copy Objects to Layer, which does two things at once -- and with a nice style, too. The tip contains a dialog box file (DCL) as well as the LISP source code, so place the DCL file somewhere in the normal AutoCAD search path. After loading the LISP code, type Cpl at the Command prompt to activate the command. A dialog box appears, displaying a list of the current layers in the drawing. Select one of the layer names or the button to pick from an object in the drawing. When ready, select OK to continue to the copy portion of the command function. Select objects to be copied in the normal manner inside AutoCAD. Next, pick the base point and the displacement point. The objects will be copied, and the layer value changed to the layer name that you selected in the dialog box at the start of the command. This tip is a nicely coded example of how to manipulate the layer table, use a custom dialog box, and work the AutoCAD commands. A tip of the hat to Theodorus.



Average Rating:

User comments