对IFeatureClass进行Join后,如果获取关联Table后的属性表?

对IFeatureClass进行Join后,如果获取JoinTable后的属性表?
已邀请:

朱新颖

赞同来自:

【解决办法】:
通过IDisplayTable.DisplayTable获取Join后的Table。


private IFeatureClass FeatureJoinTableFon(IFeatureLayer mFeatureLayer, ITable mTable, string mFeatureField, string mTableField) 

IFeatureClass inputFeatureClass = mFeatureLayer.FeatureClass; 
ITable FeatureTable = inputFeatureClass as ITable; 
IMemoryRelationshipClassFactory memoryRelClassFactory = new MemoryRelationshipClassFactory(); 
IRelationshipClass relationshipClass = memoryRelClassFactory.Open(test, FeatureTable as IObjectClass, mFeatureField, mTable as IObjectClass, mTableField, Forwardfield, Backwardfield, esriRelCardinality.esriRelCardinalityOneToOne); 
IRelationshipClassCollectionEdit pRelClassCollEdit = mFeatureLayer as IRelationshipClassCollectionEdit; 
pRelClassCollEdit.AddRelationshipClass(relationshipClass); 
IDisplayTable displayTable = pRelClassCollEdit as IDisplayTable; 
IFeatureClass outputFeatureClass = displayTable.DisplayTable as IFeatureClass; 
return outputFeatureClass; 
}

\菜 o_o

赞同来自:

IDisplayRelationshipClass DisplayRelationshipClass = mFeatureLayer as IDisplayRelationshipClass;
 DisplayRelationshipClass.DisplayRelationshipClass(relationshipClass, ESRI.ArcGIS.Geodatabase.esriJoinType.esriLeftInnerJoin);
和这个有什么区别啊,感觉用pRelClassCollEdit没有说明连接方式
用这个代码返回的好像还是没有连接之前的 
 

要回复问题请先登录注册