<?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: Unable to see the objects in the map through arcengine code in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-see-the-objects-in-the-map-through/m-p/313925#M8179</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried adding the refresh but to no avail.&amp;nbsp; I can have the layer added through code, and the layer added via the "Add Data" button, and only the layer from the button will show the objects.&amp;nbsp; Both have the underlying data available, it's just the map object which isn't appearing from the code added layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 May 2010 15:47:59 GMT</pubDate>
    <dc:creator>MichaelWaits</dc:creator>
    <dc:date>2010-05-04T15:47:59Z</dc:date>
    <item>
      <title>Unable to see the objects in the map through arcengine code</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-see-the-objects-in-the-map-through/m-p/313923#M8177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Very new to GIS so bear with my description of the problem.&amp;nbsp; I am coding in VS 2008 in VB.&amp;nbsp; I am trying to load up a geodatabase and show the contents on a mapcontrol, but the objects don't appear in the control when I add it through code.&amp;nbsp; I add the geodatabase through the Add Data toolbar button and the features appear on the map.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My code follows and the geodatabase is attached.&amp;nbsp; Can anyone notice anything wrong with what I am doing?&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 objWorkspaceFactory As IWorkspaceFactory2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim objGDBFeatureWorkspace As IFeatureWorkspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim objGDBFeatureLayer As IFeatureLayer&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; objWorkspaceFactory = New FileGDBWorkspaceFactory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objGDBFeatureLayer = New FeatureLayer&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; objGDBFeatureWorkspace = CType(objWorkspaceFactory.OpenFromFile(strFilePath, 0), IFeatureWorkspace)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objGDBFeatureLayer.FeatureClass = objGDBFeatureWorkspace.OpenFeatureClass("Site_Lots_TEST")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objGDBFeatureLayer.Name = objGDBFeatureLayer.FeatureClass.AliasName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AxMapControl1.AddLayer(objGDBFeatureLayer)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 17:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-see-the-objects-in-the-map-through/m-p/313923#M8177</guid>
      <dc:creator>MichaelWaits</dc:creator>
      <dc:date>2010-04-30T17:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see the objects in the map through arcengine code</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-see-the-objects-in-the-map-through/m-p/313924#M8178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All you should need to do is refresh the active view at the end of your code block:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size:2;"&gt;AxMapControl1.ActiveView.Refresh()&lt;BR /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 May 2010 15:12:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-see-the-objects-in-the-map-through/m-p/313924#M8178</guid>
      <dc:creator>JeffMatson</dc:creator>
      <dc:date>2010-05-04T15:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see the objects in the map through arcengine code</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-see-the-objects-in-the-map-through/m-p/313925#M8179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried adding the refresh but to no avail.&amp;nbsp; I can have the layer added through code, and the layer added via the "Add Data" button, and only the layer from the button will show the objects.&amp;nbsp; Both have the underlying data available, it's just the map object which isn't appearing from the code added layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 May 2010 15:47:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-see-the-objects-in-the-map-through/m-p/313925#M8179</guid>
      <dc:creator>MichaelWaits</dc:creator>
      <dc:date>2010-05-04T15:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see the objects in the map through arcengine code</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-see-the-objects-in-the-map-through/m-p/313926#M8180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wasn't able to open the zip file so I couldn't test with your data...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you able to add other types of data (eg. Shapefile or PGDB)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 May 2010 18:48:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-see-the-objects-in-the-map-through/m-p/313926#M8180</guid>
      <dc:creator>JeffMatson</dc:creator>
      <dc:date>2010-05-04T18:48:03Z</dc:date>
    </item>
  </channel>
</rss>

