arcpy.CalculateField_management(test_shapefile_path, "LONDD", "float(!shape.firstpoint!.split()[0])", "PYTHON") arcpy.CalculateField_management(test_shapefile_path, "LATDD", "float(!shape.firstpoint!.split()[1])", "PYTHON")
I've tried all of the suggestions without any luck. The only way that I can get it to extract the data is if I use: !shape.firstpoint! What's worse is that I have to have the field type set to text! So, I end up with: -92.298060755811 41.6208860260915 in my destination field. I have been able to populate my desired fields from these fields and convert it to a double, but it has been a real pain.I'm running ArcInfo 9.2 does that make a difference on the syntax?Thanks
!Shape.firstpoint.X!
!Shape!.firstpoint.X
arcpy.CalculateField_management(test_shapefile_path, "test_field", "!shape.firstpoint.x!", "PYTHON_9.3", "")
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.