The final lab of the semester was short and sweet - we created parameter help messages associated with a script tool, then embedded the main python script within the tool in order make it easier to distribute. To keep our scripts 'safe' we password protected the embedded script - which means that only those who know the password can see or modify the python script.
The script tool that we modified does the following: creates a series of random points within an extent as defined by the input feature class, then creates a buffer around the randomly created points. The random points are offset from each other by a certain distance, as defined by the tool end user. A screenshot of the tool dialog box and output results is shown below.
|
Tool dialog box with custom parameter help messages on the left, and the tool results on the right. |
Parting Thoughts...
This course has proved to be very useful... I'm still in shock over being able to actually create a custom script tool that actually works! Learning the basics of how to code in Python has been very cool and I definitely think the lessons 'took'. Even if I never get a chance to write another custom tool in my life, just by being able to understand what all those code examples mean on the ArcGIS Help page will come in handy. In a strange way I think I have a better understanding of how most tools run now that I can get the gist of their associated code.
No comments:
Post a Comment