psaravanaa

Export Feature Class takes longer to complete

Discussion created by psaravanaa on Mar 6, 2014
Hi,

Can someone help me on this?

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

Here is the code snippet


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. (since the GP classes don't work in Windows OS 2003... seems to be a bug).

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.

[ATTACH=CONFIG]32000[/ATTACH]

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).

Thanks,
Saran

Attachments

Outcomes