I'm relatively new to the world of model builder and scripting, so it's likely there is a very simple solution to the question I've been trying to figure out.
I'm trying to create a tool that takes a given shapefile, interpolates it over a given surface, adds a "Length_3D" field, then calculates that length (3D) in the attribute table using the Calculate Field tool in the Data Management Toolbox. I've done the same for 2D length using !shape.length@miles! as the expression and I have no issues there.
What I can't seem to figure out is how to write an expression that will allow me to calculate the 3D length from my already interpolated line. Right now the model runs all the way through until this point then throws an error. I'm able to open the newly created ZM shape and calculate the 3D length by using the "Calculate Geometry" tool in the attribute table then selecting "3D Length". I'd really like to be able to perform this in the model though. Has anyone else had a similar issue or know how to write the expression? I've tried "!shape.3DLength@miles!, !shape.3D_Length@miles!, and !shape.3D Length@miles!" with no luck. Thanks!