Python scripting question

941
2
09-13-2016 03:27 PM
KeithD1
New Contributor III

Hopefully this is an easy answer...

I have a process to script which is interrupted by some manual steps...therefore I've split the process into two separate Python scripts.

1) Run Script A in which the user specifies various parameters. The script creates an empty table based on those parameters.

2) The user is asked to perform some manual steps in ArcMap in order to populate the empty table created in Script A (these steps cannot be scripted, unfortunately, as they rely on a custom ArcMap extension that can only be accessed via its GUI). How long this will take is indeterminate...could be <1 minute or could be <1 hour.

3) Finally, run Script B, which continues where Script A left off.

How do I get the parameters from Script A into Script B? That is, assuming there isn't some way to do this all as one script with a "Pause" function in the middle.

Thanks!

0 Kudos
2 Replies
DanPatterson_Retired
MVP Esteemed Contributor

In situations like that, you might find it easier to write to a template textfile being saved to the same folder as script.  The file can then be read when-ever by the second script and it moves on.  The user need not be away of the process at all and you can specify defaults during the process.  Hope this makes sense, I have used this in the past to avoid having to pass parameters onto upcoming processes via globals and the like, that may get lost if someone decides not to proceed to step 2 within a finite time period.

KeithD1
New Contributor III

Thanks Dan, this strategy is perfect...nice and simple.

Sent from my iPhone

0 Kudos