POST
|
Hi, I'm wanting to calculate Z values from a PointZM shapefile that I created using the 3D analyst extension InterpolateShape. I know that you can just right click from within Arc and calculate the geometry using the z value but I wanted to do this using geoprocessing. Currently I've got: arcpy.CalculateField_management([InputPointZ], "METERS", "!shape.Z!", "PYTHON_9.3", "") I don't know what the proper syntax for calculating the Z value and I'm assuming it's something like "!shape.Z!" , but that's not it. Anyone been able to do this with the CalculateField_management tool?
... View more
08-13-2012
11:32 AM
|
0
|
2
|
2783
|
POST
|
I am having the same issue, when trying to use the Match Option CLOSEST in model builder arcmap crashes. On its own Spatial join preforms as expected. any help would be appreciated. JOIN_ONE_TO_ONE Keep All target Features: True I have sp3 installed. I was having a VERY difficult time incorporating the SpatialJoin_analysis function into my python scripting process. After much trial and error I found that you can not have the geoprocessing window open, and you need to uncheck Always run in foreground from your scripts properties under the General tab. This makes it hard to see what step the script is on, but is the only way to get the spatial join with the above parameters to work.
... View more
04-20-2012
10:08 AM
|
0
|
0
|
435
|
POST
|
I've searched our internal database and asked a couple people - we dont have any known issues logged for a crash in this regards. Can you confirm you're using 10.0? Also, is the crash consistently reproducible? If it is, can you write out the steps you do where it crashes? If we can reproduce the crash, we can fix it (and of course want to fix it) I'm using ArcGIS 10 service pack 3: 1. Open ArcMap 2. From within ArcToolbox navigate to the script you would like to edit 3. Right click on the tool and Select Item Description 4. Do something (I've found you can make it crash just by opening Item Description). 5. Close Item Description 6. Click on the script, or any script and watch the program crash out :(..... Script Error I can create Item descriptions for my geoprocessing tools from within ArcCatalog though.
... View more
04-17-2012
10:29 AM
|
0
|
0
|
1576
|
POST
|
Using the arcpy module for Arc 10 you can use the following two functions to convert a text file back to a shapefile:
#Variable that is assigned an input folder location
workspace = 'C:/folderPath'
#Variable that is assigned a string name. This will be what your exported shapefile will be called.
newLayer = 'layerName'
#Create the new Event Layer. The arguments 'x','y' and 'z' are the header names associated with your lat,lon and elevation respectively
arcpy.MakeXYEventLayer_management('textFile.csv', 'x', 'y', newLayer, '', 'z')
# Process: Feature Class To Shapefile (multiple)
arcpy.FeatureClassToShapefile_conversion('layerName', workspace)
... View more
04-13-2012
08:25 AM
|
0
|
0
|
639
|
POST
|
Hi Mike, Well if you're new to Python and arcpy it may seem confusing but I'll give you some code to work with. Shapefiles are not just a single file, so you need to use the arcpy module to run some of the commands. Here's a basic program that takes all the shapefiles in a directory and saves them to a list, it then iterates over every shapefile in the directory doing a print statement to the geoprocessor. Of course you could modify the print statement to do any type of geoprocessing. I haven't tried this code, but in theory it should work.
# Import your modules, arcpy is assuming you are running ArcGIS 10x
import arcpy, sys, os, fileinput, glob, string
from arcpy import env
# Get a directory as an argument from the user. This directory is where your shapefiles are
workingDirectory = sys.argv[1]
# This sets your workspace as the user defined working directory
env.workspace = WorkingDirectory
#This establishes the variable featureClass as a list of shapefiles using the arcpy command ListFeatureClasses
featureClass = arcpy.ListFeatureClasses()
# For loop to iterate over every shapefile in the workingDirectory that is referenced as the variable featureClass
for shapefile in featureClass:
arcpy.AddMessage(shapefile)
... View more
04-04-2012
12:19 PM
|
0
|
0
|
1638
|
POST
|
I guess not for "create help" But "document tool" finds it. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001500000014000000.htm "Help" is such a generic word through the whole help/doc system 🙂 Khibma, I've been trying to add help to some of the scripts I've created at work using the methodology laid out in the above link, "documenting tools and toolboxes." After I get done editing in the item description window and then click on the tool I get a Script Error and ArcMap proceeds to crash :(. This error happens when editing the script in the catalog menu, I have also tried editing tool item descriptions from ArcCatalog and remember getting script errors there as well. I'm just not sure at what process the program crashes out. Just wanted to know if this was on my end or if other people are having this problem. I was also curious about how to add pictures to the tool's side-panel help like some of the Arc Tools have in their help descriptions. [ATTACH=CONFIG]13185[/ATTACH]
... View more
04-02-2012
09:28 AM
|
0
|
0
|
1576
|
POST
|
Hello, We are running two versions of ArcGIS at our office, 10.1 and 9.3. I am working on updating some of our python scripts and instead of making two different scripts for both, I wanted to see if I could just combine the two and have the geoprocessor catch a particular version with a conditional if statement. I know I could set a boolean sys.argv to prompt the user to enter their version of ArcGIS, but wanted to see if there was a phrase native to either arcpy or arcgisscripting that would trip the inital if statement if the user was running Arc 10 and if not the script would catch in the else statement for Arc 9.3. if [ArcGIS 10]: Do this else [ArcGIS 9.3]: Do this Thanks, Jason
... View more
02-22-2012
07:37 AM
|
0
|
4
|
2182
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|