auxiliary geometry on specific layer

auxiliary geometry on specific layer

Anonymous
Not applicable
256 Views
1 Reply
Message 1 of 2

auxiliary geometry on specific layer

Anonymous
Not applicable
Hi

What I want to do is the following:
-remember current layer
-activate layer 'Construction'
-draw construction line (as many as desired)
-when this task is finished or another command is selected by the user
then activate previous layer

Is this possible. Is this task
better done with LISP, but I have no idea of LISP.

My solution so far is:
^C^C-layer set Konstruktion;^C^C_xline hor
but I cannot set previous layer.

Thanks a lot
Roman
0 Likes
257 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Hi Roman,

Paste the snip below in your "AcadDocument" code window. It should do what I
think you're asking.

Gary

Dim oPrevLayer As AcadLayer

Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)

If UCase(CommandName) = "XLINE" Then
Set oPrevLayer = ThisDrawing.ActiveLayer
ThisDrawing.ActiveLayer = ThisDrawing.Layers("Construction")
End If


End Sub

Private Sub AcadDocument_EndCommand(ByVal CommandName As String)

If UCase(CommandName) = "XLINE" Then ThisDrawing.ActiveLayer =
oPrevLayer

End Sub
0 Likes