如题,想获得Standard Preferences里面当前激活的等级名,请问可以么?谢谢。
没有找到这个API。
不知道您的最终目标,这里列出一些相关API,您看能否换个思路达到目标:
DatabaseUtilities.GetAllSpecifications()
DatabaseUtilities.GetAllSizes(string specification)
我的目的是获得当前激活的spec,然后才能去找到对应的spec mdb文件。
前两个databaseutilities的没用过,看名字是获取所有的等级和尺寸。最后一个是改变,不是获取。
请问有方法么?是否可以先放一段管子,然后查询该管子的spec?不管行不行,能给出一段查询OPM元件属性的代码么?谢谢。
Bentley.Plant.StandardPreferences.DlgStandardPreference("SPECIFICATION");
试试这个。
Answer Verified By: Changsong Ling
请问Bentley.Plant在哪里?需要引用什么?谢谢。
C:\Program Files\Bentley\OpenPlant CONNECT Edition\OpenPlantModeler\Assemblies\bentley.plant.standardpreferences.dll
完整的代码如下:
Bentley.Plant.StandardPreferences.DlgStandardPreference.GetPreferenceValue("SPECIFICATION");
多谢!
哈,抱歉,拼接错误。