calling external program or script from within a form /workflow
Hi All
I am working on a map centric appliation that needs to maintain some administrative information during the input work flow. For instance I want to call a python script that tests the date and then returns a modified version of the date. I have the working Python script but how do I call this from the form?
I expect to use the date picker as the target and source for the date values and will set the default value from the external value but can I call the python script and return the out put to the external value.
Any thoughts would be valued.
Thanks.
Doug Osborne
0
-
You can call external VB and C# scripts in a workflow, which would act as a proxy to a Python script. It would be easier to publish a geoprocessor that does the same thing. Geoprocessors work on both spatial and non-spatial datasets.
However, if you are just formatting a date, why not just use format() or custom routine within a Workflow?0 -
We're not sure how you mean to do this.
To amplfiy my problem: My routine takes a date and returns a two other dates that are nonlinearly related. I want to add a form to my workflow that collects a date selection and consumes the resulting calculated values.I'm visualizing this much like visualBasic formdesigner where you assign a function to a widget and can pass the value to another widget or to the control program. Can I use a geoprocess like this?
0 -
Below is a simple python script that can be published as a GeoProcessor. It takes a string and reverses it. You can modify and publish your python script similarly. import arcpy # Get the input string from the Geoprocessor in_string = arcpy.GetParameter(0) # Reverse the string out_string = in_string[::-1] # Return the output string to the Geoprocessor arcpy.SetParameter(1, out_string)0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer