Apologies, if this is the wrong forum to post in. I am upgrading an application from using ArcObjects 9.3 to 10.2. It???s coded in C# using Visual Studio 2010. I???ve got almost everything working except for the option to create a locator from a shapefile. Here???s the code that I???m calling: Geoprocessor gp = new Geoprocessor();
CreateAddressLocator addressLocatorGPTool = new CreateAddressLocator("US Address - Dual Ranges", referenceData, fieldMap, addressLocator);
ITrackCancel cancel = new CancelTrackerClass();
gp.OverwriteOutput = true;
try
{
gp.Execute(addressLocatorGPTool, cancel);
}
catch(Exception exc)
{
object severity = 2;
string errors = gp.GetMessages(ref severity);
}
addressLocatorGPTool = null;
gp = null;
Here are the variable values being passed in:referenceData = "C:\7.0 Source\CSServer\bin\Debug\Maps\streetcl.shp" 'Primary table'fieldMap = 'Feature ID' FID VISIBLE NONE;'*From Left' L_F_ADD VISIBLE NONE;'*To Left' L_T_ADD VISIBLE NONE;'*From Right' R_F_ADD VISIBLE NONE;'*To Right' R_T_ADD VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;'Prefix Type' <None> VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;'Suffix Type' TYPE VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE;'Left City or Place' <None> VISIBLE NONE;'Right City or Place' <None> VISIBLE NONE;'Left Zipcode' ZIPL VISIBLE NONE;'Right Zipcode' ZIPR VISIBLE NONE;'Left State' <None> VISIBLE NONE;'Right State' <None> VISIBLE NONEaddressLocator = C:\7.0 Source\CSServer\bin\Debug\Maps\LOC_HamiltonIt always hits my exception handler with an error that says:System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel)
at ESRI.ArcGIS.Geoprocessor.Geoprocessor.ExecuteInner(IGPProcess process, ITrackCancel trackCancel, IGeoProcessor igp, IVariantArray iva)
at ESRI.ArcGIS.Geoprocessor.Geoprocessor.Execute(IGPProcess process, ITrackCancel trackCancel)The error message that comes back from gp.GetMessages = ???ERROR 000042: Failed to create the address locator.
Failed to execute (CreateAddressLocator).???Is there any way to know what I???m doing wrong? The error is vague. I???ve been wrestling with this for a couple days now and I would really appreciate the help.Thank you,Mario SuauFederal Signal - Alerting and Notification Systems