|
POST
|
Hi Martin, How large is the feature class you are trying to edit (i.e. 10,000 features)? Also, would you be able to create a test feature class, save it in a new MXD, publish the MXD to server and see if you can reproduce this error? I'm wondering if it's something specific to your configuration or something with this specific feature class/service. Thanks, Jake
... View more
10-10-2011
07:30 AM
|
0
|
0
|
1277
|
|
POST
|
Here is an example on how to do this: import arcpy
from arcpy import env
env.workspace = r"C:\temp\python\VECTOR.sde"
for fc in arcpy.ListFeatureClasses("*"):
for field in arcpy.ListFields(fc, "", "GlobalID"):
if field.name == "GlobalID":
print fc + " contains GlobalIDs"
for fd in arcpy.ListDatasets("*"):
for fc in arcpy.ListFeatureClasses("*", "", fd):
for field in arcpy.ListFields(fc, "", "GlobalID"):
if field.name == "GlobalID":
print fc + " contains GlobalIDs" The above code will search all stand-alone feature classes, and feature classes with feature datasets to see if the GlobalID field exists. You will just need to update 'env.workspace' to your SDE connection file.
... View more
10-10-2011
06:26 AM
|
0
|
3
|
2147
|
|
POST
|
Is the client machine able to access the virtual output directory? You can follow the steps in the following KB article to see if they can. If the client cannot, this is most likely why you are receiving the error message.
... View more
10-10-2011
06:08 AM
|
0
|
0
|
1277
|
|
POST
|
Looks like the problem is with your 'df' variable. You will need to reference the MXD and then the data frame. Change it to the following and I believe everything should work: df = arcpy.mapping.ListDataFrames (mxd, "Layers") [0]
... View more
10-05-2011
10:56 AM
|
0
|
0
|
2219
|
|
POST
|
What version of ArcGIS are you using? If you are using ArcGIS 10, I would recommend creating a mosaic dataset.
... View more
10-05-2011
04:52 AM
|
0
|
0
|
572
|
|
POST
|
The web help is incorrect where it states: REQUIRED �??The field is a required field. This means new records must contain a value for the field. Required fields are permanent and can not be deleted. 'This means new records must contain a value for the field' should be removed. Setting a field to 'Required' will only make it permanent, and disable the option to delete it.
... View more
10-05-2011
04:45 AM
|
0
|
0
|
777
|
|
POST
|
Hi gabrisch, You actually cannot have a feature class with the same name, even if it resides in a separate feature dataset.
... View more
10-05-2011
03:48 AM
|
0
|
0
|
1975
|
|
POST
|
I wasn't able to find a way to accomplish this just using the Describe function, but was able to get the full path by combining the Describe function with some OS functions and looping through each feature dataset. Ex: catalogPath = arcpy.Describe("Highway").catalogpath
for FD in arcpy.ListDatasets("*"):
for FC in arcpy.ListFeatureClasses("*", "", FD):
if os.path.basename(catalogPath) in FC:
fullPath = os.path.dirname(catalogPath) + os.sep + FD + os.sep + FC
print fullPath
... View more
10-05-2011
03:46 AM
|
0
|
0
|
1768
|
|
POST
|
Hi Scott, Can you elaborate a little more on what you will be copying (i.e. tables, feature classes, etc)? What is the purpose of a daily copy from your FGD to SDE? Is it to update the SDE feature classes with edits that were created in the FGD? If so, have you considered geodatabase replication? This will allow you to synchronize changes from the FGD to SDE with a click of a button.
... View more
09-30-2011
04:26 AM
|
0
|
4
|
3500
|
|
POST
|
Hi Tim, Here is an example on how to do this using the 'ArcSDESqlExecute' function, as lpugh01 mentioned: import arcpy
sdeConn = arcpy.ArcSDESQLExecute("GIS01", "sde:oracle11g:orcl", "", "vector", "vector")
tableList = ["School_District, "Building_Sites", "Parcels"]
for table in tableList:
print table + " contains the following cities:"
try:
print sdeConn.execute('select distinct City from ' + table)
except AttributeError:
print "None, field does not exist" The above code will run through each table and search for a field named 'City' and return the distinct values.
... View more
09-30-2011
03:47 AM
|
0
|
0
|
1127
|
|
POST
|
Hi Tim, Here is an example on how to do this using the 'ArcSDESqlExecute' function, as lpugh01 mentioned: import arcpy sdeConn = arcpy.ArcSDESQLExecute("GIS01", "sde:oracle11g:orcl", "", "vector", "vector") tableList = ["School_District, "Building_Sites", "Parcels"] for table in tableList: print table + " contains the following cities:" try: print sdeConn.execute('select distinct City from ' + table) except AttributeError: print "None, field does not exist" The above code will run through each table and search for a field named 'City' and return the distinct values.
... View more
09-30-2011
03:46 AM
|
0
|
0
|
1127
|
|
POST
|
Hi J, You can do this using the '.rsplit' method. Ex: !Details_Primary_Address1!.rsplit(',', 1)[0]
... View more
09-29-2011
02:35 AM
|
0
|
0
|
941
|
|
POST
|
What are you attempting to update with the 'UpdateCursor' function? The field names will be different with a temporary join. Can you post the rest of your code?
... View more
09-28-2011
11:34 AM
|
0
|
0
|
429
|
|
POST
|
Hi Casey, I was able to get this to work with the following code. It will loop through each feature in a feature class and create a 2x2 fishnet for each feature. import arcpy
from arcpy import env
env.workspace = r"C:\temp\python\test.gdb"
env.overwriteOutput = True
fc = "Airports"
rows = arcpy.SearchCursor(fc)
for row in rows:
x = row.OBJECTID
arcpy.MakeFeatureLayer_management(fc, "fc_lyr", "OBJECTID = " + str(x))
rows2 = arcpy.SearchCursor("fc_lyr")
for row2 in rows2:
XMIN = row2.shape.extent.XMin
YMIN = row2.shape.extent.YMin
XMAX = row2.shape.extent.XMax
YMAX = row2.shape.extent.YMax
YMIN2 = row2.shape.extent.YMin + 10
orig_coord = str(XMIN) + " " + str(YMIN)
y_axis = str(XMIN) + " " + str(YMIN2)
corner_coord = str(XMAX) + " " + str(YMAX)
arcpy.CreateFishnet_management("Fishnet_" + str(x), orig_coord, y_axis, "0", "0", "2", "2", corner_coord, "NO_LABELS", "", "POLYGON")
del row, rows, row2, rows2
... View more
09-28-2011
11:01 AM
|
0
|
0
|
901
|
|
POST
|
I would recommend using the 'Create Fishnet' tool to create a polygon envelope of 4 equal pieces. You can use a feature class as the extent and then simply specify the number of columns and rows.
... View more
09-28-2011
08:44 AM
|
0
|
0
|
901
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM | |
| 1 | 01-20-2026 04:04 AM | |
| 1 | 12-29-2025 06:27 AM |
| Online Status |
Online
|
| Date Last Visited |
yesterday
|