|
POST
|
We are using a custom VB add-in tool in ArcMap to record transactional history for updates to our Address feature class. Example: 105 Main St was entered incorrectly 3 years ago. The editor updates to the correct information, which is 110 Main St. In the SQL table, the table stores the unique ID of the address, the old address (105 Main St), the new address (110 Main St), the update time, and editor using Windows authentication. We are trying to migrate this custom add-in tool in ArcMap to attribute rules with arcade expressions into ArcGIS Pro. The question I have is can anyone point me towards a resource for recording in a separate table edits to a feature class recording the attribute value prior to the edit and what the new value is.
... View more
01-26-2021
07:56 AM
|
0
|
3
|
3276
|
|
POST
|
I have a script from an ArcMap toolbox that updates text elements in the MXD as user input parameters below. I am trying to update this to work in Pro, but I am having trouble finding resources. I have tried updating certain codes in the second snippet below with text in bold. Original: import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") # Defines Address Element Name SiteName = arcpy.GetParameterAsText(0).upper() Address = arcpy.GetParameterAsText(1).upper() PreplanID = arcpy.GetParameterAsText(2).upper() CrossStreet = arcpy.GetParameterAsText(3).upper() Floor = arcpy.GetParameterAsText(4).lower() # Autopopulate Remaining Text Elements from User Inputs and Cursor search for elm in arcpy.mapping.ListLayoutElements(mxd,"TEXT_ELEMENT"): if elm.name == 'SiteName': elm.text = SiteName elif elm.name == 'Address': elm.text = Address elif elm.name == 'PreplanID': elm.text = PreplanID elif elm.name == 'CrossStreet': elm.text = CrossStreet elif elm.name == 'Floor': elm.text = Floor Failing update: import arcpy aprx = arcpy.mp.ArcGISProject("CURRENT") # Defines Address Element Name SiteName = arcpy.GetParameterAsText(0).upper() Address = arcpy.GetParameterAsText(1).upper() PreplanID = arcpy.GetParameterAsText(2).upper() CrossStreet = arcpy.GetParameterAsText(3).upper() Floor = arcpy.GetParameterAsText(4).lower() # Autopopulate Remaining Text Elements from User Inputs and Cursor search for elm in arcpy.mp.ListLayoutElements(aprx,"TEXT_ELEMENT"): if elm.name == 'SiteName': elm.text = SiteName elif elm.name == 'Address': elm.text = Address elif elm.name == 'PreplanID': elm.text = PreplanID elif elm.name == 'CrossStreet': elm.text = CrossStreet elif elm.name == 'Floor': elm.text = Floor
... View more
01-05-2021
04:18 PM
|
0
|
3
|
2508
|
|
POST
|
The issue I found is that I applied attribute rules and upgraded an annotation feature class to ArcGIS Pro version. I tried updating the RBJ in ArcMap, but once you upgrade to attribute rules and Pro version of annotation, it is not able to read in ArcMap. As a result, I am unable to change the RBJ files now.
... View more
12-23-2020
12:50 PM
|
0
|
0
|
2689
|
|
IDEA
|
I have seen questions on GeoNet about this, but not on the idea board. Is there a plan to allow for the creation or updating of RBJ files in ArcGIS Pro?
... View more
12-23-2020
10:37 AM
|
1
|
3
|
3534
|
|
POST
|
Thank you, Michael, that did work. This will be helpful as we will have parallel Python environments of 2.7.x and 3.x until we can fully migrate to ArcGIS Pro.
... View more
08-31-2020
09:08 AM
|
0
|
1
|
2562
|
|
POST
|
In trying to migrate Python Scripts from ArcGIS Desktop Python 2.7.x to ArcGIS Pro 3.x, we email staff if there is a failure on a routine. Below I am running a sync replica routine using ArcGIS Pro, deliberately breaking it on the file path to the database connection string so it will email a failure. Somewhere in migration, it does not like the email code that has been working for years now. Has anyone else had to upgrade email failures from 2.7.x to 3.x in Python? With using the correct file path, the routine was successful. We use Windows Task Scheduler to run Python routines. I receive the error (server name omitted for security): try:
arcpy.management.SynchronizeChanges(r"C:\Tech_Info\DB_CONX\SERVER\SERVER ParentDatabase user.sde", "ReplicaName", r"C:\Tech_Info\DB_CONX\Server\SERVER ChildDatabase user.sde", "FROM_GEODATABASE1_TO_2", "IN_FAVOR_OF_GDB1", "BY_OBJECT", "RECONCILE ")
except Exception as e:
arcpy.AddMessage("SynchronizeChanges_management ISGIS.ReplicaName Failed..." +'\n')
txtFile.write("SynchronizeChanges_management ISGIS.ReplicaName Failed..." +'\n')
txtFile.write (arcpy.GetMessages() + '\n')
HOST = "host.server.com"
SUBJECT = "Priority: CRITICAL Routine Failure"
TO = "[email protected]"
FROM = "Routine Failure<[email protected]>"
text = "Routine has failed. Please see log file for detailed information. \n Error Message: \n " + str(e.msg)
BODY = string.join((
"From: %s" % FROM,
"To: %s" % TO,
"Subject: %s" % SUBJECT,
"",
text
), "\r\n")
server = smtplib.SMTP(HOST)
server.sendmail(FROM, [TO], BODY)
server.quit()
... View more
08-27-2020
10:30 AM
|
0
|
3
|
2638
|
|
POST
|
Thank you, Johannes, that did the trick. Your help is appreciated.
... View more
08-18-2020
09:39 AM
|
0
|
0
|
4422
|
|
POST
|
Thank you, Johannes, It has definitely made progress, I then receive an error: An invalid SQL statement was used. [SELECT MasterID, OBJECTID FROM COH_Address WHERE SHAPE@]
... View more
08-17-2020
09:34 AM
|
0
|
2
|
4422
|
|
POST
|
Environment: ArcGIS Desktop 10.6.1 Below, I am attempting to snap a point feature class to the geometry of an address feature class based on a common 'Master ID' field using a join. The code originally comes from arcgis desktop - Snapping point to point based on attribute? - Geographic Information Systems Stack Exchange However, this is not moving my points, and the data is clean and does match up. arcpy.MakeFeatureLayer_management("D:\\WorkSpace\\POI\\Workspace.gdb\\COH_POI", "POI_Layer", "", "", "")
arcpy.SelectLayerByAttribute_management("POI_Layer", "NEW_SELECTION", "MASTER_ID IS NOT NULL")
pt_on_line = "D:\\WorkSpace\\POI\\Workspace.gdb\\COH_Address"
pt_on_line_ID = 'MasterID' # common ID field
pt_off_line = "POI_Layer"
pt_off_line_ID = 'MASTER_ID' # common ID field
pt_on_line_dict = {str(row[0]):row[1] for row in arcpy.da.SearchCursor(pt_on_line,[pt_on_line_ID,"SHAPE@"])} # make dictionary, like {ID:geometry}
with arcpy.da.UpdateCursor(pt_off_line,[pt_off_line_ID,"SHAPE@"]) as cursor:
for row in cursor: # loop through points
row[1] = pt_on_line_dict[str(row[0])] # move point geometry to match point geometry from dictionary
cursor.updateRow(row) # update the geometry
del cursor, row
... View more
08-13-2020
11:51 AM
|
0
|
4
|
4554
|
|
IDEA
|
When exporting a feature dataset from one DB to another, the schema, features, and domains transfer over. However, attribute rules do not transfer over. Enabling attribute rules to be exported to XML schema and imported would be beneficial when migrating a schema.
... View more
06-29-2020
04:42 PM
|
1
|
2
|
2204
|
|
POST
|
I had this same issue. I was developing the schema in an FGDB, and I assumed you could simply copy and paste the feature class over to SDE and the domains would transfer over as this way would work with ArcMap. For a workaround, I did the following steps: - Export new schema to XML workspace document with data included - Import XML workspace document into SDE, this will also transfer over the domains - If you are trying to get a new schema into a feature dataset, you will need to copy and paste the source feature class as a standalone FC into SDE, then again copy and paste that FC into the feature dataset, it will have a name like _1 at the end. Delete the standalone feature class, then rename the feature class in the feature dataset by removing the _1.
... View more
06-11-2020
02:15 PM
|
4
|
0
|
5112
|
|
POST
|
We are using branch versioning for the first time in an SDE database (SQL Server 2016). For our existing traditional versioning DBs, we use the recommended compress, rebuild indexes, and analyze datasets in our nightly routines similar to ESRI documentation below. This methodology is not recommended with branch versioning, however. Is anyone using certain GP tools on a regular basis for database maintenance for an SDE database that uses branch versioning? If so, what methods are you using? Do branch versioned DBs require daily maintenance as traditional versioned DBs require? Enterprise geodatabase maintenance tasks—Manage geodatabases in SQL Server | Documentation
... View more
05-11-2020
08:49 AM
|
4
|
3
|
2446
|
|
POST
|
Trying to start/stop specific services. Using the article at How To: Stop GIS services using ArcGIS API for Python, I tried using the code but keep receiving an error message below posted code. I am running this script in IDLE (ArcGIS Pro). Using just IDLE for ArcGIS Desktop did not have the necessary modules. from arcgis.gis import GIS
import arcgis.gis.admin
gis = GIS("https://url.to.com/portal", "Username", "Password", verify_cert=False)
services = gis_servers.services.list()
#To stop specific service(s)
for service in services:
for service in server.services.list():
if service.properties.serviceName == "SampleWorldCities":
service.stop() Error Message: Traceback (most recent call last): File "Z:\Temp\Brian\test.py", line 5, in <module> services = gis_servers.services.list() NameError: name 'gis_servers' is not defined
... View more
01-08-2020
08:58 AM
|
1
|
8
|
7224
|
|
POST
|
We have a routine that uses the SDE admin connection to disconnect users from several databases nightly. Randomly, this python routine will occasionally fail with the error message below. Connection information provided was for a non-administrative user There is not any more information provided by the reports. My first guess was a permission issue like this post https://community.esri.com/thread/89448 . We are using a general SQL service account to run routines, but permissions should not explain why it fails randomly and is successful at other times.
... View more
11-13-2019
08:13 AM
|
1
|
0
|
891
|
|
POST
|
Thanks, Xander, For the exact feature class name, is that the entire connection string, or feature class name itself? Also, the tax lot feature class resides in a separate database than the address points.
... View more
08-28-2019
12:52 PM
|
0
|
1
|
1936
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12 hours ago | |
| 1 | Friday | |
| 1 | Wednesday | |
| 1 | a week ago | |
| 1 | 2 weeks ago |
| Online Status |
Online
|
| Date Last Visited |
an hour ago
|