<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic IRepresentation - Changing Geometry in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/irepresentation-changing-geometry/m-p/637665#M17168</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to figure out how to move the "representation" for a point feature (not the feature itself), but can't find a good sample.&amp;nbsp; The feature class that I have has representation applied to it (which I set up in ArcCatalog). Using ArcMap's Representation Toolbar, I can move the representation for the feature just fine. Now what I want to do is modify the representation geometry in code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found IRepresentation.RemoveShapeOverride, and this method DOES work to reset the representation...But how do you provide a new geometry or modify the existing geometry?&amp;nbsp; Presumably, IRepresentationGraphics.ChangeGeometry would do the trick, but I can't figure out how to use it (what is the ID parameter?).&amp;nbsp; But perhaps IRepresentationGraphic is not the right approach at all because I don't want to use so-called Free-Representation...I just want to modify it's shape.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Dec 2010 14:10:07 GMT</pubDate>
    <dc:creator>RiverTaig1</dc:creator>
    <dc:date>2010-12-09T14:10:07Z</dc:date>
    <item>
      <title>IRepresentation - Changing Geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/irepresentation-changing-geometry/m-p/637665#M17168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to figure out how to move the "representation" for a point feature (not the feature itself), but can't find a good sample.&amp;nbsp; The feature class that I have has representation applied to it (which I set up in ArcCatalog). Using ArcMap's Representation Toolbar, I can move the representation for the feature just fine. Now what I want to do is modify the representation geometry in code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found IRepresentation.RemoveShapeOverride, and this method DOES work to reset the representation...But how do you provide a new geometry or modify the existing geometry?&amp;nbsp; Presumably, IRepresentationGraphics.ChangeGeometry would do the trick, but I can't figure out how to use it (what is the ID parameter?).&amp;nbsp; But perhaps IRepresentationGraphic is not the right approach at all because I don't want to use so-called Free-Representation...I just want to modify it's shape.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 14:10:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/irepresentation-changing-geometry/m-p/637665#M17168</guid>
      <dc:creator>RiverTaig1</dc:creator>
      <dc:date>2010-12-09T14:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: IRepresentation - Changing Geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/irepresentation-changing-geometry/m-p/637666#M17169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I figured this out: Here's the VBA code to grab a point feature (it happens to have an ObjectID of&amp;nbsp; 34599) and set it's representation geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Private Sub MoveRepresentation()
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pMxDoc As IMxDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pMap As IMap
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pFeatLayer As IFeatureLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pGeoFeatLayer As IGeoFeatureLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRepRenderer As IRepresentationRenderer
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRepClass As IRepresentationClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pFC As IFeatureClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRepRule As IRepresentationRule
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pGeom As IGeometry
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pPtCol As IPointCollection
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pPt As IPoint
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pFeat As IFeature
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pDisp As IDisplayTransformation
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim i As Integer, lID As Long, lIndex As Long
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRep As IRepresentation
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pMC As IMapContext
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pMxDoc = ThisDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pMap = pMxDoc.FocusMap
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pFeatLayer = pMap.Layer(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pFC = pFeatLayer.FeatureClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pGeoFeatLayer = pFeatLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp; If TypeOf pGeoFeatLayer Is RepresentationRenderer Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pRepRenderer = pGeoFeatLayer.Renderer
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pRepClass = pRepRenderer.RepresentationClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pPt = New Point
&amp;nbsp;&amp;nbsp;&amp;nbsp; pPt.PutCoords 2216006.2, 393858.2 'Use map units
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pFeat = pFC.GetFeature(34599) 'Get a specific feature
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pMC = New MapContext
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pDisp = pMxDoc.ActiveView.ScreenDisplay.DisplayTransformation
&amp;nbsp;&amp;nbsp;&amp;nbsp; pMC.InitFromDisplay pDisp
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pRep = pRepClass.GetRepresentation(pFeat, pMC)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pRep.Shape = pPt
&amp;nbsp;&amp;nbsp;&amp;nbsp; pRep.UpdateFeature
&amp;nbsp;&amp;nbsp;&amp;nbsp; pFeat.Store
&amp;nbsp;&amp;nbsp;&amp;nbsp; '** Refresh the TOC '** Draw the map
&amp;nbsp;&amp;nbsp;&amp;nbsp; pMxDoc.ActiveView.Refresh
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
End Sub&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:06:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/irepresentation-changing-geometry/m-p/637666#M17169</guid>
      <dc:creator>RiverTaig1</dc:creator>
      <dc:date>2021-12-12T03:06:43Z</dc:date>
    </item>
  </channel>
</rss>

