|
POST
|
After troubleshooting with: - a series of compresses, rebuild indexes and analyze datasets ran manually - Two nights of automated compress, rebuild and analyze Python routines - Recreate replicas with a different ID I still have lingering SDE states in the SDE_States table. When running a query for all records in the table, I receive:
... View more
06-28-2019
09:43 AM
|
0
|
2
|
1466
|
|
POST
|
I have had this problem as well. I make a feature layer without a definition query, then use the feature layer and use the Select by Attributes tool is where I put in the date query, then calculate field.
... View more
06-24-2019
03:21 PM
|
0
|
0
|
974
|
|
POST
|
I should say if the first database connection does not contain the layer to reference to, but the layer is in the next database.
... View more
06-20-2019
12:10 PM
|
0
|
2
|
2245
|
|
POST
|
Thanks, Jake, That worked for one data source, unfortunately, I have 3 databases referenced in the MXDs. Is there an 'if else' statement to point it towards the next database if the first one does not work?
... View more
06-20-2019
12:06 PM
|
0
|
3
|
2245
|
|
POST
|
We are changing our production server to have a prefix of 'HV'. I have a folder of MXDs I would like to update to the new server, but I am missing something from my code below. I got my start from https://gist.github.com/davehorsey/d8892b150e61d2e03617. import arcpy, os
path = r"C:\layouts"
for fileName in os.listdir (path):
basename, extension = os.path.splitext(fileName)
# select MXD files that do NOT begin with "Copy_of_" - this
# prevents the script from updating files that have already been updated
if (extension == ".mxd") and (fileName[:8] != "Copy_of_"):
fullPath = os.path.join(path, fileName)
mxd = arcpy.mapping.MapDocument(fullPath)
print fullPath
# update data sources
mxd.findAndReplaceWorkspacePaths("Database Connections\\Server Database NT Auth.sde", "Database Connections\\HV_Server Database NT Auth.sde")
print "\tUpdated: SDE data sources"
# check for broken links
brknList = arcpy.mapping.ListBrokenDataSources(mxd)
for brknItem in brknList:
print "\tCheck: " + brknItem.name + " data source broken"
if not brknList:
print "\tCheck: no broken data sources"
# save a copy of the MXD
saveACopy_filename = "Copy_of_" + fileName
saveACopy_fullpath = os.path.join(path, saveACopy_filename)
mxd.saveACopy(saveACopy_fullpath)
print "\tSaved: " + saveACopy_filename
del mxd
# delete the original MXD
arcpy.Delete_management(fullPath)
print "\tDeleted: " + fullPath
... View more
06-20-2019
11:40 AM
|
0
|
5
|
2380
|
|
POST
|
When using the Apply Symbology From Layer file in Pro via Model Builder, it will revert the labels back prior to any changes I have made. I have updated the layer file (.lyrx) that it references too, but does not seem to stick as it does in ArcMap with a Layer (.lyr) file.
... View more
05-22-2019
08:49 AM
|
0
|
0
|
725
|
|
POST
|
We updated one of our SDE editor's computers from 10.3.1 to 10.6.1 (ArcGIS Server SDE at 10.3.1). I am able to edit on their 10.6.1 computer, but when they go to edit the same data they get the red warning 'No Editable Layers' with a warning for each layer 'Check to see that you have the appropriate permissions'. We have tested numerous machines both on Windows 8 and 10. We had that user edit the same data on ArcMap 10.3.1 and they were able to edit.
... View more
05-17-2019
03:39 PM
|
0
|
1
|
1171
|
|
POST
|
My goal is to list all indexes that are being used on each feature class in an SDE database with ~50 feature classes that reside, with the end product being a list of the feature class and what the name of the index is. import arcpy
arcpy.env.workspace = r"Database Connections\Server Database Login.sde"
# Get list of indexes and print properties
FCs = arcpy.ListFeatureClasses()
for FC in FCs:
indexes = arcpy.ListIndexes(FC)
for index in indexes:
print FC
print("Name : {0}".format(index.name))
print("IsAscending : {0}".format(index.isAscending))
print("IsUnique : {0}".format(index.isUnique))
... View more
05-02-2019
12:19 PM
|
1
|
0
|
904
|
|
POST
|
A follow up to my above comment, while 5TH and MAIN does not work, NE 5TH AND MAIN does work just by adding NE at the beginning.
... View more
05-02-2019
07:59 AM
|
0
|
2
|
2335
|
|
POST
|
Hi Shana and Devon, Has there been any update on this issue? I am having the same issue as we are upgrading from 10.3.1 to 10.6.1. On both levels, E MAIN ST and NE 5TH AVE works, however on 10.3.1 MAIN and 5TH works but does not work on 10.6.1.
... View more
05-02-2019
07:18 AM
|
0
|
3
|
2335
|
|
POST
|
I usually do that but it requires a spatial join, then a table join, then a calculate field. In the case of my schema here, I don't have a unique ID field to join back to on a table join.
... View more
03-14-2019
02:17 PM
|
1
|
0
|
2736
|
|
POST
|
Thanks, Mitch, That worked. I was able to make a separate python file for each point feature class and just schedule it sequentially in task scheduler, takes about 10 minutes to run instead of 2 hours. I also took your advice about doing the geoprocessing on my local drive. I ended up deleting the features where the PlanRefID was NULL after exporting locally then append them back into SDE at the end of the script. Thanks for your help.
... View more
03-13-2019
04:04 PM
|
0
|
0
|
2736
|
|
POST
|
I am working on a python script that updates a field titled 'PlanRefID' field in several point feature classes. These are populated based on a 'PlanRefID' field in a polygon feature class. The cursor will loop through and populate the 'PlanRefID' field in the point feature classes (approximately 10) correctly. The issue I am having is that I only want it to update where the PlanRefID IS NULL in my point feature classes. However, it will loop through all records in the polygon feature class, which is taking about 1.5 - 2 hours to run. As the feature classes add more records, the processing time will only increase. I only interested in updating the point features where the PlanRefID IS NULL and referencing the polygons they intersect. arcpy.MakeFeatureLayer_management("Database Connections\\Server Database OWNER.sde\\Database.OWNER.FeatureDataset\\Database.OWNER.Polygon", "Database_OWNER_Polygon")
arcpy.MakeFeatureLayer_management("Database Connections\\Server Database OWNER.sde\\Database.OWNER.FeatureDataset\\Database.OWNER.Point", "Database_Owner_Point", "PlanRefID IS NULL")
arcpy.SelectLayerByAttribute_management("Database_Owner_Point", "NEW_SELECTION", "PlanRefID IS NULL")
rows = arcpy.SearchCursor("Database_OWNER_Polygon")
for row in rows:
arcpy.SelectLayerByAttribute_management("Database_OWNER_Polygon", "NEW_SELECTION", "\"OBJECTID\" = " + str(row.getValue("OBJECTID")))
arcpy.SelectLayerByLocation_management("Database_Owner_Point", "INTERSECT", "Database_OWNER_Polygon", "", "NEW_SELECTION")
arcpy.CalculateField_management("Database_Owner_Point", "PlanRefID", "'{0}'".format(str(row.getValue("PlanRefID"))), "PYTHON_9.3", "") print "Finished processing " + str(row.getValue("PlanRefID"))
... View more
03-13-2019
10:34 AM
|
0
|
4
|
3036
|
|
POST
|
We are in the process of importing our water mains into an asset management system. The system rejects any line segments with an arc/curve (example below). I think these were imported ~15 - 20 years ago from CAD. Trying to research a way to query out these features that will need to be updated to not contain arc segments. I looked through some Data Reviewer options but did not yield any results yet. We are on Desktop 10.3.1.
... View more
02-14-2019
07:33 AM
|
0
|
1
|
1822
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | yesterday | |
| 1 | yesterday | |
| 1 | yesterday | |
| 1 | Friday | |
| 1 | 3 weeks ago |
| Online Status |
Online
|
| Date Last Visited |
10 hours ago
|