我想通过 Ocean 在 Petrel 的自定义单位系统中添加自定义单位。
正如开发人员指南中所建议的,我使用了以下代码:
IUnitService unitService = Slb.Ocean.Core.CoreSystem.GetService();
IUnitCatalog catalog = unitService.GetCatalog(null);
System.Collections.Generic.IDictionary map =
new System.Collections.Generic.Dictionary();
map["Pressure"] = "MyUnit";
catalog.CreateCustomUnitSystem("My UnitSystem",
"UnitSystem for my additional units.",
map,
"MyUnitSystem");
我将该代码放在 Initialize 和 Integrate 方法中。在这两种情况下,Ocean 都会抛出 SEHException。
知道出了什么问题吗?