Engine 10.2.1 background geoprocessing 64 bit

03-14-2016 10:17 AM
New Contributor

Hi to all,

i have to execute a geoprocessing inside Engine 10.2.1 operation and after that launch cmd (with 64 bit python executable) using following c# code

Geoprocessor g = new Geoprocessor();

string PythonPath = @C:\sample.py";

System.Diagnostics.ProcessStartInfo start = new System.Diagnostics.ProcessStartInfo();

start.FileName = @"C:\Python27\ArcGISx6410.2\python.exe";

start.Arguments = string.Format("{0} {1}", PythonPath, "Param");

start.RedirectStandardOutput = false;

start.UseShellExecute = true;

System.Diagnostics.Process process = System.Diagnostics.Process.Start(start);


The cmd windows and py script launch doesnt work if before i istance geoprocessor.

If i rem  //Geoprocessor g = new Geoprocessor(); all works good.

If i use 32 bit console ( start.FileName = @"C:\Python27\ArcGIS10.2\python.exe";) all works good always , with or without instance of geoprocessor.

Any ideas ?

Thanks in advanced


0 Kudos
1 Reply
Regular Contributor II

What happens if you use the 64 bit instance of the python exe that comes with the background gp/ArcGIS Server install? It should be in a path similar to C:\Python27\ArcGISx6410.3.

If you're not using ArcObjects to process anything you shouldn't need to have any references to any ArcObjects classes in your code. Are you just needing a c# console application to run a script against 64 bit python?

0 Kudos