欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

vbnet 有关对接口的继承的实现

程序员文章站 2022-04-11 12:50:22
...
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Runtime

<Assembly: ExtensionApplication(GetType(InitAndOpt.InitClass))>
<Assembly: CommandClass(GetType(InitAndOpt.OptimizeClass))>
Namespace InitAndOpt
    Public Class InitClass : Implements IExtensionApplication
        <CommandMethod("InitCommand")>
        Public Sub InitCommand()
            Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
            ed.WriteMessage("Test")
        End Sub

        Public Sub Initialize() Implements IExtensionApplication.Initialize
            Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
            ed.WriteMessage("程序开始初始化。")
        End Sub

        Public Sub Terminate() Implements IExtensionApplication.Terminate
            System.Diagnostics.Debug.WriteLine("程序结束,你可以在里做一些程序的清理工作,如关闭AutoCAD文档")
        End Sub
    End Class
End Namespace

相关标签: VB