<?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: Featureclass is null from Featurelayer in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/featureclass-is-null-from-featurelayer/m-p/67803#M1822</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unfortunately, I do not think it is because of the data source not being valid. I had the user create a brand new file geodatabase, with a brand new feature class inside of it with a few points. This also came back null. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The real tricky thing for me was that I created a python script to run through the mxd doing the export as well, and that worked just fine, it exported everything to shapefiles, but yet still when trying to access via ArcObjects it comes back null. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am well and truly stumped.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 May 2014 15:23:46 GMT</pubDate>
    <dc:creator>DerrickPlotsky</dc:creator>
    <dc:date>2014-05-22T15:23:46Z</dc:date>
    <item>
      <title>Featureclass is null from Featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/featureclass-is-null-from-featurelayer/m-p/67800#M1819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using ArcObjects 10.1 to read an MXD and am trying to export all of the layers inside of it to shapefiles. I am first getting the featureclass from the layer by using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IFeatureLayerDefinition2 featureDefinition = (IFeatureLayerDefinition2)featureLayer;

IQueryFilter queryFilter = new QueryFilterClass();
queryFilter.WhereClause = featureDefinition.DefinitionExpression;
queryFilter.SubFields = "*";
IFeatureClass featureClass = featureLayer.FeatureClass;

IDataset dataset = (IDataset)featureClass;
IFeatureClassName inFCName = (IFeatureClassName)dataset.FullName;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However sometimes the FeatureClass is null. This doesn't happen in my environment when I'm testing both within and outside of Visual Studio. However once someone else runs the code against the same MXD then the FeatureClass is null. I have checked the MXD they are using and the links to the data are not broken. It is successfully opening the MXD because I am able to extract the symbol information, but it's just not able to read the data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone think of any other reason that this might be returning null? Is there something else I should be asking them to look at in their environment for why this is happening? Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 16:21:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/featureclass-is-null-from-featurelayer/m-p/67800#M1819</guid>
      <dc:creator>DerrickPlotsky</dc:creator>
      <dc:date>2014-05-01T16:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Featureclass is null from Featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/featureclass-is-null-from-featurelayer/m-p/67801#M1820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Where is the data for those layers located?&amp;nbsp; If it's on a server, make sure those users have permissions to access the data location.&amp;nbsp; If the data is local but is in a location created by you, make sure other users can see that location (Windows sometimes hides things you create from other users on the machine, depending on how you have permissions set up).&amp;nbsp; Another thing to try is to have the other users create a folder connection in ArcCatalog to the folder where the data is located.&amp;nbsp; I've seen that clear things up in past versions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 17:23:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/featureclass-is-null-from-featurelayer/m-p/67801#M1820</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2014-05-01T17:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Featureclass is null from Featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/featureclass-is-null-from-featurelayer/m-p/67802#M1821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;it usually happens when the data source of that feature layer is not valid (wrong password, no longer valid instance, etc)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 15:00:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/featureclass-is-null-from-featurelayer/m-p/67802#M1821</guid>
      <dc:creator>elioelias</dc:creator>
      <dc:date>2014-05-09T15:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Featureclass is null from Featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/featureclass-is-null-from-featurelayer/m-p/67803#M1822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unfortunately, I do not think it is because of the data source not being valid. I had the user create a brand new file geodatabase, with a brand new feature class inside of it with a few points. This also came back null. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The real tricky thing for me was that I created a python script to run through the mxd doing the export as well, and that worked just fine, it exported everything to shapefiles, but yet still when trying to access via ArcObjects it comes back null. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am well and truly stumped.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 15:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/featureclass-is-null-from-featurelayer/m-p/67803#M1822</guid>
      <dc:creator>DerrickPlotsky</dc:creator>
      <dc:date>2014-05-22T15:23:46Z</dc:date>
    </item>
  </channel>
</rss>

