Run python script in process via .Net add-in

4129
1
Jump to solution
07-17-2014 11:58 AM
ClintDow
Occasional Contributor

Hello all,

I am creating an interface in WPF that will call python scripts via the System.Diagnostics.Process method.

This is working successfully and my scripts are completing just fine. I'm simply wondering if there is a way to call the arcgis Python instance rather than having to spawn a new one, similar to checking the 'Run Python Script in process' check box in a script's properties within arc. In doing so I hope to speed up the execution time of the script.

I figure there may be a way to retrieve the process ID of the arcgis python instance via arcobjects, but so far have not found any documentation on the topic, can anyone provide some insight?

1 Solution

Accepted Solutions
seria
by Esri Contributor
Esri Contributor


Documentation on leveraging ArcPy in an ArcObjects Application can be found here:

Leveraging ArcPy in a .NET application

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//000100000m0s000000 

View solution in original post

1 Reply
seria
by Esri Contributor
Esri Contributor


Documentation on leveraging ArcPy in an ArcObjects Application can be found here:

Leveraging ArcPy in a .NET application

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//000100000m0s000000