EPLAN P8 API开发入门
运行Microsoft Visual
Studio并新建一个C#类库项目,如下图所示
新建项目窗口上部选择.NET版本,并设置好项目名称和路径。
重命名C#源文件名为“AddInModule.cs”,类名改名为“AddInModule”。
在项目中添加引用“EPLAN API
ApplicationFramework”、“EPLAN API Base”和“EPLAN API Gui”。
修改项目属性里的程序集名为“EPLAN.EplAddin.MyAddIn”。
在类“AddInModule”中添加如下内容:
public class AddInModule :
Eplan.EplApi.ApplicationFramework.IEplAddIn
{
public bool OnRegister(ref System.Boolean bLoadOnStart)
{
bLoadOnStart = true;
return true;
}
public bool OnUnregister()
{
return true;
}
public bool OnInit()
{
return true;
}