- 积分
- 1819
- 明经币
- 个
- 注册时间
- 2010-10-9
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2015-4-3 19:38:45
|
显示全部楼层
<Assembly: ExtensionApplication(GetType(Cadd.TlsApplication))>
Namespace Cadd
Class TlsApplication
Implements IExtensionApplication
Sub Initialize() Implements IExtensionApplication.Initialize
CadD.Start()
End Sub
Sub Terminate() Implements IExtensionApplication.Terminate
End Sub
End Class
Public Class CadD
Public Shared Sub Start()
AA()
End Sub
Public Shared Sub AA()
Dim MenuGroup As Object = Nothing
Dim Menu As Object
Try
MenuGroup = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication.MenuGroups.Item(0)
Menu = MenuGroup.Menus.Item("AA")
Catch ex As System.Exception
Menu = MenuGroup.Menus.Add("AA")
Menu.AddMenuItem(0, "a1", "_A1 ")
Menu.AddMenuItem(1, "a2", "_A2 ")
End Try
Try
MenuGroup.Menus.InsertMenuInMenuBar("AA", "编辑(&E)")
Catch ex As System.Exception
MsgBox(ex.Message)
End Try
End Sub
End Class
End Namespace |
|