I am working on representation movement tool. In my project I want to move representation symbol (Only move representation symbol not feature geometry) within 15 feet from 3 way or 4 way junction. I got representation feature but I have searched option for representation moment in Arc Objects C#.Net. Please help me for my problem.
IRepresentation Interface (http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/IRepresentation.htm)
After Getting Representation feature how to get and move Representation marker symbol in arcobjects:
IFeatureLayer sysVal_layer = new FeatureLayerClass();
sysVal_layer.FeatureClass = SystemValve;
double scale = 9600;
IMapContext pMapCText = new MapContextClass();
IGeoFeatureLayer pGFlayer = sysVal_layer as IGeoFeatureLayer;
IGeoDataset pgeodSet = sysVal_layer as IGeoDataset;
pMapCText.Init(pgeodSet.SpatialReference, scale, pgeodSet.Extent);
if (cnt == 1)
{
if (pGFlayer.Renderer is IRepresentationRenderer)
{
//Get Representation from feature.
IRepresentationRenderer prepReder = pGFlayer.Renderer as IRepresentationRenderer;
IRepresentationClass pRepCl = prepReder.RepresentationClass;
IRepresentation RepreFeature = pRepCl.GetRepresentation(valveF, pMapCText);
if (RepreFeature.Shape.GeometryType == esriGeometryType.esriGeometryPoint)
{
IGraphicAttributes graphicAtt = pRepCl.GraphicAttributes as IGraphicAttributes;
int RuleID = RepreFeature.RuleID;
Hi Team any one can help me for getting representation marker symbol in C#.Net ArcObjects.
// get RepresentationRule for current Representation IRepresentationRule rule = repClass.RepresentationRules.Rule[representation.RuleID]; // assume that RuleLayer 0 is the Marker IBasicMarkerSymbol basicMarkerSymbol = rule.Layer[0] as IBasicMarkerSymbol; // get GraphicAttributes of the Marker IGraphicAttributes attributes = basicMarkerSymbol.MarkerPlacement as IGraphicAttributes; // on the Representation set value for X/Y-Offset representation.set_Value(attributes, esriMarkerPlacementAttributes.esriGAOnPointXOffset, 5); representation.set_Value(attributes, esriMarkerPlacementAttributes.esriGAOnPointYOffset, 5);
Assuming you set up your representation's geometry editing behavior to use Override geometry, you can set IRepresentation.Shape to the modified geometry, then call IRepresentation.UpdateFeature() and finally call IFeature.Store().