Pausing Model Execution

1415
2
Jump to solution
09-02-2016 10:09 AM
ChrisHolmes
Occasional Contributor III

Hello Everyone,

I am working on a model where the first step is a small script that uses os.startfile to open an mxd file. The script takes less than a second to run but it can take around 20 seconds for the mxd file to fully open. Is there something that I can do to prevent the next step of the model from running until the mxd is fully open rather than right after the script completes?

Thanks all,

Chris

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

It tends to go against the purpose of using geoprocessing tools or models.

They are designed to 'go' once all the inputs are input.

Having a step where the user selects an mxd sounds like it should be a separate tool in a multiset toolset.

Arranging steps as separate entitites is one design, otherwise you should be scripting in python which is easier to control timing and such.  To incorporate a python tool that does this within a model is not worth it.  If you have reached the limits of what modelbuilder is designed to do, you might want to consider moving to tools that use python (two flavors) or arcobjects.

View solution in original post

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

It tends to go against the purpose of using geoprocessing tools or models.

They are designed to 'go' once all the inputs are input.

Having a step where the user selects an mxd sounds like it should be a separate tool in a multiset toolset.

Arranging steps as separate entitites is one design, otherwise you should be scripting in python which is easier to control timing and such.  To incorporate a python tool that does this within a model is not worth it.  If you have reached the limits of what modelbuilder is designed to do, you might want to consider moving to tools that use python (two flavors) or arcobjects.

0 Kudos
ChrisHolmes
Occasional Contributor III

Good points Dan. Thank you!

0 Kudos