1# 引用
C:AVEVAMarineOH12.1.SP4Aveva.ApplicationFramework.dll
C:AVEVAMarineOH12.1.SP4Aveva.ApplicationFramework.Presentation.dll
2# 引用命名空间,
using Aveva.ApplicationFramework.Presentation;
using Aveva.ApplicationFramework;
3# 继承接口Iaddin
4#写代码
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 }
5# 配置插件加载
把编译生成的dll复制到Aveva Marine的安装目录下下面
打开以下文件,再最后加入自己的插件的名称
C:AVEVAMarineOH12.1.SP4HullDesignAddins.xml
6# 启动am,加载插件成功