Export Feature Class takes longer to complete

1584
3
03-04-2014 11:18 AM
Labels (1)
SaranPon
New Contributor
Hi,

The ExportFeatureClass() method takes longer (about 1 minute to 3 minutes).  Approximate number of records range from 1000+.

Here is the code snippet

            IExportOperation exportOp = new ExportOperationClass();
            exportOp.ExportFeatureClass(sourceDatasetName, null, null, null, destinationClassName, 0);

It also displays a dialog box during the processing:
[ATTACH=CONFIG]31929[/ATTACH]

My questions are:

1) How can we reduce the export duration?
2) How can we hide the dialog box during the processing?

Thanks,
Saran
0 Kudos
3 Replies
BKuiper
Occasional Contributor III
Hi Saran,

you will have to provide a bit more information. Where are you seeing this dialog box? When does it take longer to complete, in comparison to what?

Btw, if this is in ArcMap or ArcCatalog. Make sure you are using the latest version and/or have the latest service pack installed. We experienced a case where the installation of SP1 on ArcMap 10.1 increased the speed tremendously.
0 Kudos
SaranPon
New Contributor
Hi,

Thank you for your reply.

I am trying to achieve this through WPF code.

Here are the steps I am following:

1) My Data is in Excel file (exceeds >5000 records most of the time) -> Due to ESRI limitation of handling >4999 records, I am converting the data to a File Geodatabase. I am achieving this using Python.

         cMapWork.ConvertExceltoTableUsingPython(xlsFilePath, excelTableName, dataSheet);

2) My geo data (for example, zipcode) is in a layer (inside MXD file)

3) Both the data are joined to get the Geo area as a table.

         pRelClass = pMemRelFact.Open("TabletoLayer", (IObjectClass)pTLayer, primaryKeyField, (IObjectClass)excelTable, strJnField,
                    "forward", "backward", esriRelCardinality.esriRelCardinalityOneToOne);   //esriRelCardinalityOneToOne
         IDisplayRelationshipClass pDispRC = (IDisplayRelationshipClass)pFeatLayer; // use Relate to perform a join
         pDispRC.DisplayRelationshipClass(pRelClass, esriJoinType.esriLeftInnerJoin);   //esriLeftInnerJoin

4) This data is then converted as a feature class

            IDatasetName srcName = (IDatasetName)((pFeatLayer as IGeoFeatureLayer).DisplayFeatureClass as IDataset).FullName;
            IDatasetName destName = new FeatureClassNameClass() as IDatasetName;
            destName.Name = "datasetname";
            IWorkspaceName destWsName = new WorkspaceNameClass();
            destWsName.PathName = gdbPath; //file geo database path
            destWsName.WorkspaceFactoryProgID = "esriDataSourcesGDB.FileGDBWorkspaceFactory.1";
            IFeatureClassName destFeatureClassName = new FeatureClassNameClass();
            IDatasetName destDatasetName = (IDatasetName)destFeatureClassName;
            destDatasetName.WorkspaceName = destWsName;
            destDatasetName.Name = "destDataSetName";
            IExportOperation exOp = new ExportOperationClass();
            exOp.ExportFeatureClass(srcName, null, null, null, destFeatureClassName, 0); // Exporting joined results as a Feature Class


The issues I face are in the last step.
1. I am getting the dialog box during the process which is good but it is showing the feature class name which is not required for my user so I want to get rid of the dialog box. I don't see any option to turn off the dialog box.

2. The Export FeatureClass operation takes too long depends on my records size; minimum it takes around 1.5 minutes to maximum 5 minutes (I didn't go crazy with the maximum).

Are there ways to achieve this more efficiently?

Thanks,
Saran
0 Kudos
BKuiper
Occasional Contributor III
Hi Saran,

it seems that you are using ArcObjects code to achieve this. This is not the right forum then. This forum is focused on answering questions regarding ArcGIS Runtime for WPF. You are combining ArcObjects code in your WPF application, but the functions that you are executing are not part of the ArcGIS Runtime SDK.

An approach through ArcGIS Runtime would be to convert your (legacy) ArcObjects code into a Python script and package it as a GPK and execute through the Runtime, but doesn't necessarily solve your issues. I would recommend posting your question on the ArcObjects forum.

Sorry i can't help.
0 Kudos