PDMS의 SITE 리스트를 순서대로 구하는 로직입니다.
PdmsStandalone.Open("Sample", "SYSTEM", "XXXXXX", "SAMPLE"); DbElement oWorld = MDB.CurrentMDB.GetFirstWorld(DbType.Design); DbElement oSite = oWorld.FirstMember(DbElementTypeInstance.SITE); while (!oSite.IsNull) { string sName = oSite.GetString(DbAttributeInstance.NAME); Console.WriteLine("Name = {0}", sName); DbElement oZone = oSite.FirstMember(DbElementTypeInstance.ZONE); while (!oZone.IsNull) { sName = oZone.GetString(DbAttributeInstance.NAME); Console.WriteLine(" Name = {0}", sName); DbElement oEle = oZone.FirstMember(); while (!oEle.IsNull) { sName = oEle.GetString(DbAttributeInstance.NAME); string sType = oEle.GetString(DbAttributeInstance.TYPE); Console.WriteLine(" Type = {0},Name = {1}", sType, sName); oEle = oEle.Next(); } oZone = oZone.Next(DbElementTypeInstance.ZONE); } oSite = oSite.Next(DbElementTypeInstance.SITE); } PdmsStandalone.Close();
댓글
댓글 쓰기