Is there way to do what the 'Interpolate Shape' tool does but calculates the z values into the Shape field of the input feature instead of making a new output? As far as I can tell the only other way is by using the 3D Analyst toolbar and selecting the 'Interpolate' tool based on the geometry I need but I'd rather not have to click that every time I digitize something but would prefer to do it after all my features at once after they're created. 'Interpolate Shape' does that but makes a separate file, which does not fit into my workflow. Is there another way? Perhaps using the Field Calculator?
None exist. You could experiment witth scriptting the process, generating the output in memory, deleting the original (if possible) and replacing it. Whether this could be done in one step... I am not sure.
Indeed as Dan states, it is most unlikely that you can if the featureclass has not yet the Z values enabled.
Suppose you have a Polyline featureclass (Shapefield will contain "Polyline" not "Polyline Z"). When you create the featureclass, you specify if Z (and M) values are enabled. If Z is not enabled, you can set the Z values of the vertices, but they will not be stored. If the featureclass has Z values enabled on creation but you do not set them initially, you can update the Z values without creating a new output (although this would require some scripting).
> it is most unlikely that you can if the featureclass has not yet the Z values enabled.
Z Values are enabled for my feature classes! Shape field has a value of 'Polyline Z'.
>If the featureclass has Z values enabled on creation but you do not set them initially, you can update the Z values without creating a new output (although this would require some scripting).
This is what I need to do. Is there any more information on this method?
OK, you have polylines with Z enabled, yet Z has no value assigned yet.
What I would do in this case is create a tmp point featureclass with the vertices of the polygons and information on original OID of the polyline, part number and point number (to be able to link the vertice after Z has been defined back to same vertice in the polyline). Next, assuming you have spatial analyst available, is use the tool extract values to points to extract the Z value for each point into a new tmp featureclass (you could do this using the IN_MEM workspace, but it depends on the amount of points, if this will work in memory).
The next step would be to create a search cursor and fill a dictionary from the points with the Z values as attribute (use OriginalOID_PartNumber_PointNumber as key and the Z as value) and use this when you create the update cursor to update the Z value if the individual vertices.
You can find detailed information on working with 3D geometries in arcpy in my blog post here: Working with 3D and M-aware geometries in Arcpy
Thank you for the reply. That sounds like it would work, but again I just want the z values calculated in the existing dataset, no temp files or output files. I guess it's impossible, save for using the 3D Analyst Toolbar 'Interpolate' for every feature I create. I'm trying to streamline a very large data collection workflow.
There are always solutions... See an alternative method pointed out in this document: Extract Raster Values using Numpy
That's disappointing! Thanks for the reply