Aveva Marine C# 二次开发入门001

1# 引用 

C:\AVEVA\Marine\OH12.1.SP4\Aveva.ApplicationFramework.dll

C:\AVEVA\Marine\OH12.1.SP4\Aveva.ApplicationFramework.Presentation.dll

2# 引用命名空间,

using Aveva.ApplicationFramework.Presentation;
using Aveva.ApplicationFramework;

3# 继承接口Iaddin

4#写代码

Aveva Marine C# 二次开发入门001
 1  public class Class1 : IAddin
 2     {
 3         public string Name { get; }
 4 
 5         public string Description { get; }
 6 
 7         public void Start(ServiceManager serviceManager)
 8         {
 9             System.Windows.Forms.MessageBox.Show("欢迎使用本插件!");
10         }
11 
12         public void Stop()
13         {
14             System.Windows.Forms.MessageBox.Show("感谢使用本插件!");
15         }
16     }
View Code

Aveva Marine C# 二次开发入门001

5# 配置插件加载

把编译生成的dll复制到Aveva Marine的安装目录下下面

打开以下文件,再最后加入自己的插件的名称

?C:\AVEVA\Marine\OH12.1.SP4\HullDesignAddins.xml

Aveva Marine C# 二次开发入门001

 6# 启动am,加载插件成功

Aveva Marine C# 二次开发入门001

 

Aveva Marine C# 二次开发入门001

上一篇:iOS开发系列-Block本质篇


下一篇:LINUX挂接Windows文件共享