如何获取构建所有属性信息

老师们好,我想得到图片里面所有的属性信息。我看了很多帖子都没有实现,只是获得了一点点“通用”属性,比如name color weight之类的。但是其他的属性都没有获取到。

我通过element去便利然后获取IDgnECInstance 再用IECProperty去尝试都无法成功。能告诉我的错误在哪里吗?真的非常感谢。

下面是我的部分代码:

DgnModel dgnModel = Session.Instance.GetActiveDgnModel();
IEnumerator<Element> iEe = dgnModel.GetGraphicElements().GetEnumerator();
iEe.Reset();
while (iEe.MoveNext())
{
Element elTmp = iEe.Current;
LogLine = string.Format("ElementId : {0} ClassType : {1} ElemenType : {2} ElemenTypeName : {3}", elTmp.ElementId.ToString(), elTmp.GetType().ToString(), elTmp.ElementType, elTmp.TypeName);
WriteLogLine(LogLine);

DgnECManager aa = DgnECManager.Manager;
DgnECInstanceCollection ss = aa.GetElementProperties(elTmp, ECQueryProcessFlags.SearchAllClasses);
//DgnECInstanceCollection ss = aa.GetElementProperties(elTmp, ECQueryProcessFlags.);
IEnumerator<IDgnECInstance> ie = ss.GetEnumerator();


ElementPropertiesGetter pgetter = new ElementPropertiesGetter(elTmp);
var color = pgetter.Color;
var ww = pgetter.Weight;

try
{

var clas1s = pgetter.ElementClass.ToString();
var LineStyle = pgetter.LineStyle.ToString();

Bentley.MstnPlatformNET.Session org = Bentley.MstnPlatformNET.Session.Instance;
FileLevelCache lc = org.GetActiveDgnFile().GetLevelCache();
LevelHandle lh = lc.GetLevel(pgetter.Level, false);
string levelname = lh.Name;
//ElementPropertiesGetter v3 = new ElementPropertiesGetter();
//DVector3d v3 = pgetter.Thickness();

LogLine = string.Format("color : {0} ww : {1} name : {2} class : {3} LineStyle : {4}", color, ww, levelname, clas1s, LineStyle);
WriteLogLine(LogLine);

}
catch(ArgumentNullException)
{
LogLine = string.Format("color111 : {0} ww : {1} ", color, ww);
WriteLogLine(LogLine);
}
ie.Reset();
while (ie.MoveNext())
{
IDgnECInstance idec = ie.Current;
IEnumerator<IECPropertyValue> iem = idec.GetEnumerator(false);
if (iem != null)
{
iem.Reset();
while (iem.MoveNext())
{
IECPropertyValue tmpProperty = iem.Current;
tmpProperty.Property.ToString();

foreach (IECProperty prop in idec.ClassDefinition.Properties(true))
{
var nn = prop.Name;
}

}

}
}