POST
|
Thanks for your answer Tope. I'll try to convert both the workflow database and clients to 10.3 as close to the same time as I can. But during the process hopefully 10.2 clients will continue to work with the 10.3 database.
... View more
05-16-2015
06:56 PM
|
0
|
0
|
331
|
POST
|
I have a question about backward compatibility: We are currently running workflow 10.2 and will be upgrading to 10.3. I have upgraded a test workflow database to 10.3 using the workflow post-installation tool. My question is can users running ArcGIS 10.2 operate against this database? I have tried this using Workflow Manager 10.2 and it seems to work so far. But is it officially supported? We have many users running 10.2 on their workstations. It will take time to upgrade them all to 10.3, so it would be helpful if we can do this at our leisure after the workflow database is upgraded.
... View more
05-14-2015
02:06 PM
|
0
|
3
|
3907
|
POST
|
I still have no idea why this program crashes or hangs after using the GeoProcessor. But I found it's easy to create a new feature class based on a template using code like this: public static IFeatureClass CreateFeatureClassByTemplate( IWorkspace workspace, string newFeatureClassName, IFeatureClass template, string configKeyword = null) { IFeatureWorkspace fWorkspace = (IFeatureWorkspace)workspace; return fWorkspace.CreateFeatureClass(newFeatureClassName, (IFields)((IClone)template.Fields).Clone(), template.CLSID, template.EXTCLSID, template.FeatureType, template.ShapeFieldName, configKeyword); }
... View more
10-29-2012
12:11 PM
|
0
|
0
|
330
|
POST
|
I'm writing a standalone application that executes the "Create feature class" tool using Geoprocessor. The tool runs successfully. However when the program exits is when I have a problem. The program either hangs indefinitely or crashes upon exiting the Main method. This is in C# using ArcGIS 10.1 against a geodatabase on SQL Server 2012. I've read about the necessity of manually freeing COM objects sometimes in order to avoid these problems. But all the sample code I've ever seen that uses Geoprocessor doesn't do this. Various samples show the Geoprocessor object and whatever tool object is being used with it created normally using "new", with no special handling done to free them afterwards. As a test I also tried running the "Copy" tool and had the same problem. As another test I ran the same code against a file geodatabase and did not run into this issue. It's against a geodatabase in SQL server that it happens. I tried both an enterprise geodatabase and a SQL Express geodatabase with the same result. I've pared my code down to the small example below that demonstrates the problem. Again the tool runs successfully and the new feature class is created from the specified template. No problem. It's upon exit from Main that I get a crash. Any ideas on how to just use Geoprocessor from C# successfully?
using System;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geoprocessor;
using ESRI.ArcGIS.DataManagementTools;
namespace TestGP
{
class Program
{
private static LicenseInitializer m_AOLicenseInitializer = new TestGP.LicenseInitializer();
[STAThread()]
static void Main(string[] args)
{
m_AOLicenseInitializer.InitializeApplication(
new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeAdvanced },
new esriLicenseExtensionCode[] { });
string workspacePathname = @"C:\Users\username\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\connection.sde";
Geoprocessor gp = new Geoprocessor();
gp.SetEnvironmentValue("workspace", workspacePathname);
CreateFeatureclass tool = new CreateFeatureclass();
tool.out_path = workspacePathname;
tool.out_name = "MyNewRoads";
tool.template = "Geo1.DBO.RoadTemplate";
tool.has_m = "SAME_AS_TEMPLATE";
tool.has_z = "SAME_AS_TEMPLATE";
object sev = null;
try
{
gp.Execute(tool, null);
}
catch (Exception exp)
{
Console.WriteLine("Exception: " + exp.Message);
Console.WriteLine(exp.StackTrace);
}
finally
{
Console.WriteLine(gp.GetMessages(ref sev));
}
Console.WriteLine("Created new feature class");
}
}
}
... View more
10-25-2012
03:53 PM
|
0
|
5
|
1942
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|