# Purpose: adding features to a tin. # Create the geoprocessor object Import Arcgisscriptinggp = Arcgisscripting. Create () # Check out the 3D Analyst Extension GP. checkoutextension ( " 3D " ) Try : # Set the workspace (to avoid having to type in the full path to the data E # GP. workspace = "D:/docs1/GP/gpoutput" GP. workspace = " E:/cztinspcs " # Select the 3D Analyst toolbox GP. toolbox = " 3D " # Process: add features to a blank Tin Params = ( " Polygonregionpcs. SHP <none> hardclip true " ) GP. edittin_3d ( " Earthcopy " , Params) Except : # If an error occurred while running the tool print the error messages. Print GP. getmessages ()
Note: (1) Back up tin before execution
(2) The running machine needs to install Python // Several megabytes
(3) change the followingCodeCopy the file to the TXT file, modify the suffix to. py, and run it.