Next on our tour of the Layer II toolbar is the CopytoLayer command.
Click the command and then select a layer that you want to copy onto another layer. This does not move the entity, it makes a copy of it on the target layer. Once you have selected the entities, hit enter and the select the target layer.
If you type in “N” for name, it displays a list of layers that you can select as the destination layer. (note: these are not my layer names – it is a demo file from Autodesk). You can also enter a name in the Destination Layer box to create a new layer. The new layer inherits the properties (on/off, freeze/thaw, locked/unlocked, etc.) of the current layer.
September 24th, 2007 at 11:45 PM
you can also set a command reactor – ie if the mtext command is activated then the text entered will be on a certain layer automatically :
Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)
‘Remember – command ie LINE must be in capitals
Dim objLayer As AcadLayer
Dim strLayerName As String
If CommandName = “MTEXT” Or CommandName = “TEXT” Then
strLayerName = (“0cm-Annot-Text”)
Set objLayer = ThisDrawing.Layers.Add(strLayerName)
If ThisDrawing.Layers.Item(“0cm-Annot-Text”).Freeze = True Then
ThisDrawing.Layers.Item(“0cm-Annot-Text”).Freeze = False
ElseIf ThisDrawing.Layers.Item(“0cm-Annot-Text”).LayerOn = False Then
ThisDrawing.Layers.Item(“0cm-Annot-Text”).LayerOn = True
End If
ThisDrawing.ActiveLayer = objLayer
ThisDrawing.SendCommand “_MText” & vbCr: ThisDrawing.SendCommand “_regen” & vbCr