<?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: How to change feature weights for standard graphics layer programmatically?? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-change-feature-weights-for-standard/m-p/347729#M9196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dude!&amp;nbsp; Go for it! Don't look back.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if that doesn't pan out.. what if you tried creating a GraphicsSubLayer and add your graphic element to that. Then you could maybe use setWeight, or sendToBack or sendBackward?&amp;nbsp; Worth a shot..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;com.esri.arcgis.carto.GraphicsSubLayer&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jul 2013 13:24:16 GMT</pubDate>
    <dc:creator>LeoDonahue</dc:creator>
    <dc:date>2013-07-26T13:24:16Z</dc:date>
    <item>
      <title>How to change feature weights for standard graphics layer programmatically??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-change-feature-weights-for-standard/m-p/347727#M9194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wrote some ArcObjects code (ArcGIS 9.2, VB.NET) which creates some graphic elements programmatically and then exports the map. some labels that overlap with the graphic features are not displayed. the "manual" solution is to open the Labeling toolbar, click on "Label Weight Ranking" and set the feature weight of the standard layer to "none". I would like to change the feature weights programmatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know which interfaces I can use in order to access the feature weights of the standard layer?? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you in advance for you help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Johannes&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 15:06:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-change-feature-weights-for-standard/m-p/347727#M9194</guid>
      <dc:creator>johannesuhl</dc:creator>
      <dc:date>2013-07-19T15:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to change feature weights for standard graphics layer programmatically??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-change-feature-weights-for-standard/m-p/347728#M9195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found a workaround for my problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Quit GIS business.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Become a rock star.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 13:02:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-change-feature-weights-for-standard/m-p/347728#M9195</guid>
      <dc:creator>johannesuhl</dc:creator>
      <dc:date>2013-07-26T13:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to change feature weights for standard graphics layer programmatically??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-change-feature-weights-for-standard/m-p/347729#M9196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dude!&amp;nbsp; Go for it! Don't look back.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if that doesn't pan out.. what if you tried creating a GraphicsSubLayer and add your graphic element to that. Then you could maybe use setWeight, or sendToBack or sendBackward?&amp;nbsp; Worth a shot..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;com.esri.arcgis.carto.GraphicsSubLayer&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 13:24:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-change-feature-weights-for-standard/m-p/347729#M9196</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2013-07-26T13:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to change feature weights for standard graphics layer programmatically??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-change-feature-weights-for-standard/m-p/347730#M9197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot for your help! It worked. I created a new graphics layer for which I set the weight to zero using IBarrierProperties. I cast the IGraphicsContainer object to the graphicsLayer and add the graphic element to the container.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since the feature weight is 0, labels that are within the graphic element bounding box are displayed now!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Johannes&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here comes the code: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pMap As IMap = pMxDoc.FocusMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim graphicsLayer As IGraphicsLayer = New CompositeGraphicsLayerClass()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CType(graphicsLayer, ILayer).Name = "TESTLAYER"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMap.ActiveGraphicsLayer = CType(graphicsLayer, ILayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMap.AddLayer(CType(graphicsLayer, ILayer))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pBarrierProperties As IBarrierProperties&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pBarrierProperties = graphicsLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pBarrierProperties.Weight = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pGContainer As IGraphicsContainer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGContainer = pMxDoc.FocusMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGContainer = graphicsLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGContainer.AddElement(pGraphicElement1, 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMxDoc.ActiveView.Refresh()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2013 09:26:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-change-feature-weights-for-standard/m-p/347730#M9197</guid>
      <dc:creator>johannesuhl</dc:creator>
      <dc:date>2013-07-31T09:26:03Z</dc:date>
    </item>
  </channel>
</rss>

