时间:2014-1-21 作者:悬浮的青春 分类: gis二次开发
IMap pMap=AxMapControl1.Map;
ILayer pLayer=pMap.layer(0);
IFeatureLayer pFLayer=( IFeatureLayer) pLayer;
IFeatureClass pFeatureClass=pFLayer.FeatureClass;
IMemoryRelationshipClassFactory pMemoRelCFactory=new MemoryRelationshipClassFactoryClass();
IRelationshipClass pRelationshipClass = pMemoRelCFactory.Open (“TableJoin1”,pFClass,”OBJECTID”,(IObjectClass)pForeignTable, ”OBJECTID”, ”forward”, ”backward”, esriRelCardinality.esriRelCardinalityOneToOne);
IDisplayRelationshipClass pDisplayRelationshipClass=( IDisplayRelationshipClass)pFlayer;
pDisplayRelationshipClass.DisplayRelationshipClass(pRelClass,esriJoinType.esriLeftOuterJoin); //左连接。
标签: arcgis
推荐阅读: