Advertisement
Guest User

Untitled

a guest
May 27th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. IMemoryRelationshipClassFactory pMemRelFact = new MemoryRelationshipClassFactoryClass();
  2. IRelationshipClass pRelClass = pMemRelFact.Open("TabletoLayer", (IObjectClass)pTTable, dbfJnField, (IObjectClass)pFeatLayer.FeatureClass, layerJnField, "forward", "backward", esriRelCardinality.esriRelCardinalityOneToMany);
  3.  
  4. IDisplayRelationshipClass pDispRC = (IDisplayRelationshipClass) pFeatLayer;
  5. pDispRC.DisplayRelationshipClass(pRelClass, esriJoinType.esriLeftInnerJoin);
  6.  
  7. Type memRelClassFactoryType = Type.GetTypeFromProgID("esriGeodatabase.MemoryRelationshipClassFactory");
  8. IMemoryRelationshipClassFactory memRelClassFactory = (IMemoryRelationshipClassFactory)Activator.CreateInstance(memRelClassFactoryType);
  9. IGeoFeatureLayer gfLayer = pFeatLayer as IGeoFeatureLayer;
  10. IRelationshipClass pRelClass = pMemRelFact.Open("TabletoLayer", (IObjectClass)pTTable, dbfJnField, (IObjectClass)gfLayer.DisplayFeatureClass, layerJnField, "forward", "backward", esriRelCardinality.esriRelCardinalityOneToMany);
  11.  
  12. IDisplayRelationshipClass pDispRC = (IDisplayRelationshipClass)gfLayer;
  13. pDispRC.DisplayRelationshipClass(pRelClass, esriJoinType.esriLeftInnerJoin);
  14.  
  15. IMemoryRelationshipClassFactory pMemRelFact = new MemoryRelationshipClassFactoryClass();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement