line.dvb sample code for AutoCADSave the code below to a file and load it at startup Example: (vl-vbaload "r:\\cad\\r15g\\code\\line.dvb") The result will be that when drawing a LINE command you don't get the unnessesary shortcut menu popping up. Option Explicit
' Code by Jimmy B 2000-06-08
' No shortcut menu when in line command but in all others
' When no command is active right click is treated as an enter
Dim line As Boolean
Private Sub AcadDocument_Activate()
line = False
End Sub
Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)
line = (CommandName = "LINE")
End Sub
Private Sub AcadDocument_BeginRightClick(ByVal PickPoint As Variant)
If ThisDrawing.GetVariable("cmdactive") > 0 And line Then
ThisDrawing.Application.Preferences.User.ShortCutMenuDisplay = False
Else
ThisDrawing.SetVariable "ShortcutMenu", 10
End If
End Sub
|




