启动时的菜单加载不起作用,并显示错误。已经运行TESTE命令了。
- Imports Autodesk.AutoCAD.Runtime
- Imports Autodesk.AutoCAD.ApplicationServices
- Imports Autodesk.AutoCAD.Interop
- Imports Autodesk.AutoCAD.EditorInput
- Imports System
- Namespace APPTESTENAME
- Public Class Initialization
- Implements IExtensionApplication
- Public Sub Initialize() Implements IExtensionApplication.Initialize
- MsgBox("START OK")
- Try
- Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
- Dim LINHA As String
- LINHA = "(IF (NOT (MENUGROUP ""TOPOCAD2000"")) (PROGN(COMMAND ""_MENULOAD"" ""TOPOCAD2000"")(MENUCMD ""P15=+TOPOCAD2000.POP1""))(ALERT ""\nMENU ALREADY LOADED"") ) "
- acDoc.SendStringToExecute(LINHA, True, False, False)
- Catch
- MsgBox("ERRO")
- End Try
- End Sub
- Public Sub Terminate() Implements IExtensionApplication.Terminate
- End Sub
- End Class
- Public Class COMANDOS
- <CommandMethod("TESTE")> _
- Public Sub Teste()
- Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
- Dim LINHA As String
- LINHA = "(IF (NOT (MENUGROUP ""TOPOCAD2000"")) (PROGN(COMMAND ""_MENULOAD"" ""TOPOCAD2000"")(MENUCMD ""P15=+TOPOCAD2000.POP1""))(ALERT ""\nMENU ALREADY LOADED"") ) "
- acDoc.SendStringToExecute(LINHA, True, False, False)
- End Sub
- End Class
- End Namespace
|