|
POST
|
Sort of, turn your mxd into a MapDcoument object then use ListLayers to get the layer objects in the MXD. You should then be able to pass that list layer Object into the layer to KML tool, something like below but I've probably mistyped something import arcpy, os
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "")[0]
for lyr in arcpy.mapping.ListLayers(mxd, "", df):
workspace = a folderpath to write kmls to
outKML = create a path with something like os.path.join(workspace, lyr.name)
arcpy.LayerToKML_conversion(layer, outKML)
... View more
07-21-2020
02:57 PM
|
0
|
0
|
2114
|
|
POST
|
pre-logic window (python): def func(string): #could make this better but does the job probably if len(string) > 0: result = (" ".join(((a.split(',')[1]).split(" "))[:-2]))[1:] else: result = "" return result code window below pre-logic window: func(!situs_addr!)
... View more
07-21-2020
02:10 PM
|
1
|
2
|
1943
|
|
POST
|
Do you have any experience with python/arcpy? Or do you just want it written for you? It's pretty simple either way.
... View more
07-21-2020
12:51 PM
|
0
|
2
|
2114
|
|
POST
|
Could you 'Check the Geoprocessing results window' for more details?
... View more
07-21-2020
12:49 PM
|
0
|
6
|
6855
|
|
POST
|
If I understand correctly you're looking for a script to look at all the layers in the MXD then export them as individual KMLs with appropriate names?
... View more
07-21-2020
12:16 PM
|
0
|
4
|
2114
|
|
POST
|
AS the city could be more than 1 word I might suggest splitting by a space, then takin the last but 2 entries: (" ".join((!situs_addr!.split(',')[1]).split(" "))[:-2])
... View more
07-21-2020
12:05 PM
|
2
|
9
|
6855
|
|
POST
|
Hi, I'm not sure if there's a built-in way to do it, but you could generate a buffer from your destination and check to see if your suggested route intersects it. You could also generate a Service Area for the walking distance and see if it intersects that.
... View more
07-20-2020
12:14 AM
|
2
|
1
|
2035
|
|
POST
|
Looking at your initial post, I would say your photo points are in a relationship class with the photos. The edit session is a requirement as it enables both to be updated with changes.
... View more
07-19-2020
02:08 AM
|
2
|
0
|
6999
|
|
POST
|
Is this the only line of code you're running? Theres something in the help about multiple curators running in the same workspace.
... View more
07-18-2020
03:17 PM
|
0
|
2
|
6999
|
|
POST
|
Versioning 101 Are you completely sure this is a standalone FGDB that sits on your local drive? There's no connection file such as .sde in the path? To me it seems you are trying to run the UpdateCursor on a versioned Enterprise GDB FC.
... View more
07-18-2020
12:48 PM
|
0
|
4
|
6999
|
|
POST
|
This is for one GDB, can add a Walk to iterate through GDBs also import arcpy
import os
gdb = r'C:\Users\DaveP\Documents\ArcGIS\Default.gdb'
arcpy.env.workspace = gdb
fcs = arcpy.ListFeatureClasses()
print("StandAlone Feature Classes in " + gdb)
print("\n")
for fc in fcs:
fc_path = os.path.join(gdb, fc)
desc = arcpy.Describe(fc_path)
print("____________")
print(fc)
print(desc.shapeType)
print("____________\n")
print("____________\n")
print("____________\n")
fds = arcpy.ListDatasets("", "Feature")
for fd in fds:
print("\nFeature Classes in feature Dataset - " + fd)
fds_path = os.path.join(gdb, fd)
arcpy.env.workspace = fds_path
fcs = arcpy.ListFeatureClasses()
for fc in fcs:
fc_path = os.path.join(fds_path, fc)
desc = arcpy.Describe(fc_path)
print("____________")
print(fc)
print(desc.shapeType)
print("____________\n")
... View more
07-18-2020
06:39 AM
|
2
|
2
|
6273
|
|
POST
|
import arcpy
import os
gdb = r'PathToYourGDBhere'
arcpy.env.workspace = gdb
fcs = arcpy.ListFeatureClasses()
print("StandAlone Feature Classes in " + gdb)
print("\n")
for fc in fcs:
fc_path = os.path.join(gdb, fc)
desc = arcpy.Describe(fc_path)
print("____________")
print(fc)
print(desc.shapeType)
print("____________\n")
print("____________\n")
print("____________\n")
fds = arcpy.ListDatasets("", "Feature")
for fd in fds:
print("\nFeature Classes in feature Dataset - " + fd)
fds_path = os.path.join(gdb, fd)
arcpy.env.workspace = fds_path
fcs = arcpy.ListFeatureClasses()
for fc in fcs:
fc_path = os.path.join(fds_path, fc)
desc = arcpy.Describe(fc_path)
print("____________")
print(fc)
print(desc.shapeType)
print("____________\n")
... View more
07-18-2020
06:25 AM
|
1
|
0
|
6273
|
|
POST
|
Hi Laura, Your data is not versioned if it is in a FGDB. I wish I didn't know what versioning means if I'm honest, be careful what you wish for. Was your script running in immediate mode (the python window)? I've not seen the editing requirement before, could you share your code?
... View more
07-18-2020
05:25 AM
|
0
|
6
|
6999
|
|
POST
|
How many datasets are you working with and what size? Copying features to a personal GDB might allow for them to query it through MS Access. If you have an RDBMS setup that would of course be ideal (even allow you to do spatial queries through SQL). Although I do understand its not the point, i.e. this SearchCursor is only the envisaged first-steps.
... View more
07-17-2020
01:50 PM
|
0
|
0
|
2868
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-17-2023 12:44 PM | |
| 1 | 06-13-2025 01:08 PM | |
| 1 | 09-25-2025 03:19 PM | |
| 1 | 09-24-2025 02:35 PM | |
| 1 | 09-17-2025 02:42 PM |
| Online Status |
Offline
|
| Date Last Visited |
a month ago
|