EPLAN API 入门系列- 提高篇(How to get PropertyValue?)

How to get PropertyValue?

 1         MultiLangString strValue = (MultiLangString)object.GetPropertyValue(object.Properties[j].Id);
 2         string strDesignation = object.Properties[j].Designation;
 3         string sPropertyFullName = strDesignation + ":" + _pCERICommon.GetMulValue(strValue);
 4 
 5         public string GetMulValue(MultiLangString oMultiLangString)
 6         {
 9             string sLang = "zh_CN";
10 
11             Eplan.EplApi.Base.ISOCode l = new Eplan.EplApi.Base.ISOCode(sLang);
12             Eplan.EplApi.Base.ISOCode.Language m_lang = l.GetNumber();
13             string sValue = oMultiLangString.GetString(m_lang);
14             if (sValue.Trim() == "")
15             {
16                 sLang = "??_??";        
17 l = new Eplan.EplApi.Base.ISOCode(sLang); 18 m_lang = l.GetNumber(); 19 20 sValue = oMultiLangString.GetString(m_lang); 21 } 22 23 return sValue; 24 }


 

posted @ 2013-01-21 16:24  AriLee  Views(1471)  Comments(0Edit  收藏  举报