<?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: Have to add Feature Classes from File GeoDatabase to map using ArcGIS Runtime .Net SDK in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1021448#M9727</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Kindly share me if any solutions are there.&lt;/P&gt;&lt;P&gt;It would be great help&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jan 2021 09:57:45 GMT</pubDate>
    <dc:creator>Shanmugapriya55</dc:creator>
    <dc:date>2021-01-29T09:57:45Z</dc:date>
    <item>
      <title>Have to add Feature Classes from File GeoDatabase to map using ArcGIS Runtime .Net SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019055#M9688</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to load feature classes from local&amp;nbsp;&lt;STRONG&gt;GeoDatabase&lt;/STRONG&gt; to map.&lt;/P&gt;&lt;P&gt;I can load feature classes from local&amp;nbsp;&lt;STRONG&gt;MobileGDB.&amp;nbsp;&lt;/STRONG&gt;It's difficult to load it from local File GDB.&lt;/P&gt;&lt;P&gt;But I have to load feature classes from local&amp;nbsp;&lt;STRONG&gt;FileGDB &lt;/STRONG&gt;to map.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone has any reference on this, please help me out.&lt;/P&gt;&lt;P&gt;It would be great pleasure if anyone helps me out in this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 10:16:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019055#M9688</guid>
      <dc:creator>Shanmugapriya55</dc:creator>
      <dc:date>2021-01-22T10:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Have to add Feature Classes from File GeoDatabase to map using ArcGIS Runtime .Net SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019484#M9689</link>
      <description>&lt;P&gt;File Geodatabases are not supported directly by ArcGIS Runtime, but it is possible to use them with the ArcGIS Runtime Local Server component. When using ArcGIS Runtime SDK for .NET, the Local Server is only available with the WPF API and on Windows (not supported when usinf the Android, iOS, or UWP APIs).&lt;/P&gt;&lt;P&gt;You can follow the same workflow as shown in this sample, but instead of creating a `ShapefileWorkspace`, you will create a `FileGeodatabaseWorkspace`. Note, you will need to know in advance the name of the data set within the file geodatabase that you want to add. You can achieve this by also writing a python script in ArcGIS Pro which would take an input string that is the file geodatabase path and return a list of datasets ad a geoprocessing recordset.&lt;/P&gt;&lt;P&gt;API Ref:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/T_Esri_ArcGISRuntime_LocalServices_FileGeodatabaseWorkspace.htm" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/net/latest/wpf/api-reference/html/T_Esri_ArcGISRuntime_LocalServices_FileGeodatabaseWorkspace.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Sample (Shapefile):&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/v100.7.0/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/Local%20Server/DynamicWorkspaceShapefile" target="_blank" rel="noopener"&gt;https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/v100.7.0/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/Local%20Server/DynamicWorkspaceShapefile&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Creating a geoprocessing package for Local Server:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/labs/pro/prepare-a-geoprocessing-service-for-offline-use/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/labs/pro/prepare-a-geoprocessing-service-for-offline-use/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Python script example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Import necessary modules
import arcpy
import os

# Set variables from input parameters.
workspace = arcpy.GetParameterAsText(0)

# Set the current workspace
arcpy.env.workspace = str(workspace)

# Create the output table.
outTableFc = arcpy.CreateTable_management('in_memory', 'datasets')

# Set the field names and definitions for the output table.
arcpy.AddField_management(outTableFc, 'NAME', 'TEXT', '', '', 256)
arcpy.AddField_management(outTableFc, 'DATATYPE', 'TEXT', '', '', 256)

# Create an insert cursor to insert rows into the output table.
fields = ['NAME', 'DATATYPE']
cur = arcpy.da.InsertCursor(outTableFc, fields)

# Feature
datasets = arcpy.ListFeatureClasses()

# For each dataset insert the name into a new row in the table.
for dataset in datasets:
  cur.insertRow((dataset, 'Feature Class'))
  
# Mosaic 
datasets = arcpy.ListDatasets(feature_type='mosaic')

# For each dataset insert the name into a new row in the table.
for dataset in datasets:
  cur.insertRow((dataset, 'Mosaic'))

# Raster 
datasets = arcpy.ListDatasets(feature_type='raster')

# For each dataset insert the name into a new row in the table.
for dataset in datasets:
  cur.insertRow((dataset, 'Raster'))

# Raster 
datasets = arcpy.ListDatasets(feature_type='rastercatalog')

# For each dataset insert the name into a new row in the table.
for dataset in datasets:
  cur.insertRow((dataset, 'Raster Catalog'))
		
del cur

# Set the output parameter.
arcpy.SetParameterAsText(1,outTableFc)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 19:18:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019484#M9689</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2021-01-24T19:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Have to add Feature Classes from File GeoDatabase to map using ArcGIS Runtime .Net SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019561#M9690</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;I have tried the sample which you are given. In this sample, the layer is added in the map, but it's not displaying in the map.&lt;/P&gt;&lt;P&gt;Also I have attached the output screenshot below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Shanmugapriya55_0-1611569783073.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4453i59C2F4433E6C3734/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Shanmugapriya55_0-1611569783073.png" alt="Shanmugapriya55_0-1611569783073.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be great pleasure if there is a solution for this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 10:17:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019561#M9690</guid>
      <dc:creator>Shanmugapriya55</dc:creator>
      <dc:date>2021-01-25T10:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Have to add Feature Classes from File GeoDatabase to map using ArcGIS Runtime .Net SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019788#M9696</link>
      <description>&lt;P&gt;It looks like you have a standalone test app - can you share your code?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 20:02:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019788#M9696</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2021-01-25T20:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Have to add Feature Classes from File GeoDatabase to map using ArcGIS Runtime .Net SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019923#M9698</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here, I am sharing my code.&lt;/P&gt;&lt;P&gt;It would be great help if there is a solution for this!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 11:52:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019923#M9698</guid>
      <dc:creator>Shanmugapriya55</dc:creator>
      <dc:date>2021-01-27T11:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Have to add Feature Classes from File GeoDatabase to map using ArcGIS Runtime .Net SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1021448#M9727</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Kindly share me if any solutions are there.&lt;/P&gt;&lt;P&gt;It would be great help&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 09:57:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1021448#M9727</guid>
      <dc:creator>Shanmugapriya55</dc:creator>
      <dc:date>2021-01-29T09:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Have to add Feature Classes from File GeoDatabase to map using ArcGIS Runtime .Net SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1021747#M9730</link>
      <description>&lt;P&gt;Your example was missing the code to add a FileGeodatabaseworkspace.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;try
{
	// Path to File Geodatabase (from your user input from folder browser dialog))
	string path = "";
	
	// The feature class name to add
	string featureClassName = ""
	
	// Start a service from the blank MPK
	string mapPackagePath = @"..\..\mpk_blank.mpk";

	// Create the local map service
	LocalMapService localMapService = new LocalMapService(mapPackagePath);

	// Create the shapefile workspace
	FileGeodatabaseWorkspace fileGeodatabaseWorkspace = new FileGeodatabaseWorkspace("FileGeodatabaseWorkspace1", path);
					
	// Add the dynamic workspace to the map service
	localMapService.SetDynamicWorkspaces(new List&amp;lt;DynamicWorkspace&amp;gt;() { fileGeodatabaseWorkspace });

	// Start the map service
	await localMapService.StartAsync();

	// Create the ArcGISMapImageLayer layer
	ArcGISMapImageLayer arcGISMapImageLayer = new ArcGISMapImageLayer(localMapService.Url);

	// Load the layer
	await arcGISMapImageLayer.LoadAsync();

	// Create the layer source that represents the shapefile on disk
	TableSublayerSource source = new TableSublayerSource(fileGeodatabaseWorkspace.Id, featureClassName);
	
	// Create a sublayer instance from the table source
	ArcGISMapImageSublayer fileGeodatabaseSublayer = new ArcGISMapImageSublayer(0, source);

	// Apply renderer to layer to symbolize if not default
	// ...

	// Add the shapefile sublayer to the imagery layer
	arcGISMapImageLayer.Sublayers.Add(fileGeodatabaseSublayer);

	// Add the image layer to the map
	MyMapView.Map.OperationalLayers.Add(arcGISMapImageLayer);
}
catch (Exception e)
{
	MessageBox.Show(e.ToString(), "Error");
}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 29 Jan 2021 21:04:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1021747#M9730</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2021-01-29T21:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Have to add Feature Classes from File GeoDatabase to map using ArcGIS Runtime .Net SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1023799#M9769</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your solution!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But I just need to add file geo database without mentioning the feature class name in the code.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there any possibility for this?&lt;/P&gt;&lt;P&gt;It would be great pleasure if it is there.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 05:46:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1023799#M9769</guid>
      <dc:creator>Shanmugapriya55</dc:creator>
      <dc:date>2021-02-05T05:46:40Z</dc:date>
    </item>
  </channel>
</rss>

