SHARE
TWEET

Untitled

a guest Dec 11th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. """
  2. THIS SCRIPT DIVIDES 1 BY 2 AND (ATTEMPTS TO) REPORT THE RESULTS IN SEVERAL WAYS
  3.  
  4. To create an ArcToolbox tool with which to execute this script, do the following.
  5. 1   In  ArcMap > Catalog > Toolboxes > My Toolboxes, either select an existing toolbox
  6.    or right-click on My Toolboxes and use New > Toolbox to create (then rename) a new one.
  7. 2   Drag (or use ArcToolbox > Add Toolbox to add) this toolbox to ArcToolbox.
  8. 3   Right-click on the toolbox in ArcToolbox, and use Add > Script to open a dialog box.
  9. 4   In this Add Script dialog box, use Label to name the tool being created, and press Next.
  10. 5   In a new dialog box, browse to the .py file to be invoked by this tool, and press Next.
  11. 6   In the next dialog box, press Finish.
  12. 7   To later revise any of this, right-click to the tool's name and select Properties.  
  13. """
  14.  
  15. # Import necessary modules
  16. import sys, os, string, math, arcpy
  17.  
  18. # Define two floating-point literals
  19. theNumerator    = 1.0
  20. theDenominator  = 2.0
  21.  
  22. # Report those literals noting the use of \n and str()
  23. arcpy.AddMessage( '\n' + str(theNumerator) + \
  24.             ' is to be divided by ' + str(theDenominator) + ',' )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top