arcpy.polyline enabling Z and M

516
2
11-06-2010 09:34 PM
erichfisher
New Contributor II
Hi Folks,

Quick question, what is the proper format to enable Z and M values when using the arcpy.polyline command?  The help menu says the default is 'False', which implies that the enabling value is "True", but it does not seem to work (I also have the arcpy.env settings Z and M enabled). I have also tried "hasZ" and "hasM" as well as "Enabled."  Nothing seems to work.

polyline = arcpy.Polyline(array, projection, "True", "True")

I would appreciate any feedback. 

Best,

Erich
0 Kudos
2 Replies
JeffLee
New Contributor II
Erich;

have you tried "ENABLED"?
0 Kudos
erichfisher
New Contributor II
Yes, I have tried case-sensitive versions of True/False, Enabled/Disabled, and hasZ. 

The arcpy environment settings enable all output to be Z-aware, but no matter what I've tried I cannot enable the polyline Z. I think it is because arcpy.polyline is not properly set to Z-aware that my Z values in my array are not being written into the final polyline shapefile. 

The only workaround I found was to re-write my program using an insert cursor rather than using the polyline command and copy features.
0 Kudos