<?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 Re: Representation Symbology in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/representation-symbology/m-p/283979#M7323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Francis,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need to set a representation programmatically you need to use the IREPRESENTATION interface.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002500000n3s000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002500000n3s000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, I don't have any .net code for you; however, I was able to find a VBA snippet which may help you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim pFeat As IFeature
Dim pRep As IRepresentation&amp;nbsp; '------- IRepresentationClass::PrepareFilter
Dim pGeodataset As IGeoDataset
Dim pQf As IQueryFilter
Dim pCur As IFeatureCursor
Dim pMapContext As IMapContext
Dim dScale As Double
Dim pFC As IFeatureClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Set pQf = New QueryFilter
pRepClass.PrepareFilter pQf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Prepare QueryFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Set pMapContext = New MapContext
dScale = 25000
Set pFC = pRepClass.FeatureClass
Set pGeodataset = pFC
pMapContext.Init pGeodataset.SpatialReference, dScale, pGeodataset.extent
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Set pCur = pFC.Search(pQf, False)&amp;nbsp;&amp;nbsp; 'Get a reference to featurecursor
Set pFeat = pCur.NextFeature&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Iterate through all features
Do Until pFeat Is Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Get each feature representation
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pRep = pRepClass.GetRepresentation(pFeat, pMapContext)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'do something with representation here
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pFeat = pCur.NextFeature
Loop
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nelson&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:44:21 GMT</pubDate>
    <dc:creator>NelsonDe_Miranda</dc:creator>
    <dc:date>2021-12-11T13:44:21Z</dc:date>
    <item>
      <title>Representation Symbology</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/representation-symbology/m-p/283978#M7322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a point layer file with representation symbology inside. When I add the layer file i want to symbolize it programmatically by its representation. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;by default when the layer file is added to the map its symbology is the simple symbol which is the dot, I just want to activate the representation symbology embedded in the layer file as shown in the screenshot attached, programmatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any information or help is highly appreciated. I attached the sample picture of the representation symbology that i'm talking about.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Francis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 01:08:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/representation-symbology/m-p/283978#M7322</guid>
      <dc:creator>FrancisSacdalan</dc:creator>
      <dc:date>2012-04-26T01:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Representation Symbology</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/representation-symbology/m-p/283979#M7323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Francis,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need to set a representation programmatically you need to use the IREPRESENTATION interface.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002500000n3s000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002500000n3s000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, I don't have any .net code for you; however, I was able to find a VBA snippet which may help you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim pFeat As IFeature
Dim pRep As IRepresentation&amp;nbsp; '------- IRepresentationClass::PrepareFilter
Dim pGeodataset As IGeoDataset
Dim pQf As IQueryFilter
Dim pCur As IFeatureCursor
Dim pMapContext As IMapContext
Dim dScale As Double
Dim pFC As IFeatureClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Set pQf = New QueryFilter
pRepClass.PrepareFilter pQf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Prepare QueryFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Set pMapContext = New MapContext
dScale = 25000
Set pFC = pRepClass.FeatureClass
Set pGeodataset = pFC
pMapContext.Init pGeodataset.SpatialReference, dScale, pGeodataset.extent
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Set pCur = pFC.Search(pQf, False)&amp;nbsp;&amp;nbsp; 'Get a reference to featurecursor
Set pFeat = pCur.NextFeature&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Iterate through all features
Do Until pFeat Is Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Get each feature representation
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pRep = pRepClass.GetRepresentation(pFeat, pMapContext)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'do something with representation here
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pFeat = pCur.NextFeature
Loop
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nelson&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/representation-symbology/m-p/283979#M7323</guid>
      <dc:creator>NelsonDe_Miranda</dc:creator>
      <dc:date>2021-12-11T13:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Representation Symbology</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/representation-symbology/m-p/283980#M7324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know if you still need help, but I think here &lt;/SPAN&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisdesktop/com/samples/Cartography/Representations/26ADCF02-6E0D-41E9-B939-0FE417926643.htm"&gt;http://resources.esri.com/help/9.3/arcgisdesktop/com/samples/Cartography/Representations/26ADCF02-6E0D-41E9-B939-0FE417926643.htm&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;is better sample how to add layer with representation symbology.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need more help, send an e-mail to &lt;/SPAN&gt;&lt;A href="mailto:manni.m@seznam.cz"&gt;manni.m@seznam.cz&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 05:07:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/representation-symbology/m-p/283980#M7324</guid>
      <dc:creator>RadekMandovec</dc:creator>
      <dc:date>2012-11-05T05:07:34Z</dc:date>
    </item>
  </channel>
</rss>

