Select to view content in your preferred language

QuickExport Fails

1401
4
10-25-2010 01:59 PM
ClaudeKershaw
New Contributor
ArcEngine 10
License control correctly set

the following code fails to execute, please help 🙂

            Geoprocessor gp = new Geoprocessor();
            QuickExport qe = new QuickExport();
            qe.Input = "C:\\temp\\qe\\Line_88.shp";
            qe.Output = "GML, C:\\temp\\qe\\Line_88.gml";
            gp.OverwriteOutput = true;
            gp.Execute(qe, null); // this line fails : Error HRESULT E_FAIL has been returned from a call to a COM component
0 Kudos
4 Replies
JeffReinhart
Esri Contributor
Your issues appears to be not checking out the extension in your script. I have attached a link to AOInitialize for license Extension codes.

http://help.arcgis.com/en/sdk/10.0/v...0000021000000/

Thanks,
Jeff
0 Kudos
ClaudeKershaw
New Contributor
Hi Jeff,

the link returns The webpage cannot be found error 😞

I agree, licenseStatus returns ESRIlicenseNotLicensed, do I need the extension licensed on my development machine? According to ArcGIS Manager Data Interoperability is installed and authorized for Engine.

IAoInitialize aoInitialize = new ESRI.ArcGIS.esriSystem.AoInitializeClass();
            esriLicenseStatus licenseStatus = aoInitialize.IsExtensionCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeArcView, esriLicenseExtensionCode.esriLicenseExtensionCodeDataInteroperability);
            MessageBox.Show(licenseStatus.ToString());
            MessageBox.Show(aoInitialize.IsExtensionCheckedOut(esriLicenseExtensionCode.esriLicenseExtensionCodeDataInteroperability).ToString());
            aoInitialize.CheckOutExtension(esriLicenseExtensionCode.esriLicenseExtensionCodeDataInteroperability);
            MessageBox.Show(aoInitialize.IsExtensionCheckedOut(esriLicenseExtensionCode.esriLicenseExtensionCodeDataInteroperability).ToString());
            Geoprocessor gp = new Geoprocessor();
            QuickExport qe = new QuickExport();
          
            qe.Input = "C:\\temp\\qe\\Line_88.shp";
           
            qe.Output = "GML, C:\\temp\\qe\\Line_88.gml";
           
            gp.OverwriteOutput = true;
           
            gp.Execute(qe, null);

            aoInitialize.CheckInExtension(esriLicenseExtensionCode.esriLicenseExtensionCodeDataInteroperability);
0 Kudos
PrateekBansal
Emerging Contributor
Hi just wondering if you were able to resolve to it as i am facing the same problem only that
esriLicenseStatus licenseStatus = aoInitialize.IsExtensionCodeAvailable(esriLicenseP roductCode.esriLicenseProductCodeArcView, esriLicenseExtensionCode.esriLicenseExtensionCodeD ataInteroperability);
MessageBox.Show(licenseStatus.ToString());
this shows me true .

Would appreciate your help as I am stuck .
0 Kudos
AnantThunuguntla
Occasional Contributor
I created a new Console Application(Engine) in Visual Studio 2008. I then selected the License Checking options as shown in screenshot and added the desired References

Then ran the below code:

Geoprocessor gp = new Geoprocessor();
                QuickExport qe = new QuickExport();

                qe.Input = "C:\\ Streets.shp";

                qe.Output = "GML, C:\\test.gml";

                gp.OverwriteOutput = true;

                gp.Execute(qe, null);

It gave me no errors. However, when I replaced it with the LicenseInitializer code you posted it did not work. Try the above method and if it fails please contact Tech Support. This was tested on ArcGIS 10 SP1.
0 Kudos