POST
|
Hi all! I added a point shapefile, downloaded from one of our Trimble survey controllers, to my ArcPro project, and I noticed that the On-The-Fly projection is way off. The coordinate system of the project is NAD 1983 StatePLane Utah Central FIPS 4302 Feet, and the shapefile's spatial reference is GCS WGS 1984, WKID 4326. This problem only occurs in ArcPro (left image) and not in ArcMap (right image), What am I missing here, and how can I make ArcPro project the added shapefile properly? Thanks for your help!
... View more
01-07-2020
10:08 AM
|
1
|
3
|
1005
|
POST
|
Thanks Joe. post is updated. I was actually looking for the code highlighting function, but I couldn't find it. I missed the Expand Toolbar button....
... View more
11-21-2019
02:18 PM
|
0
|
0
|
462
|
POST
|
Joe, in case you're interested, I posted the question here: https://community.esri.com/message/892788-arcpro-python-tool-update-table-to-show-edited-attributes
... View more
11-21-2019
12:47 PM
|
0
|
0
|
741
|
POST
|
Hi all, I'm sure this has been asked before, but I was not able to find an answer to my problem: I created a python tool within a toolbox in ArcPro. The tool grabs 3 attributes from a selected address point (record number, address, parcelID) with a SearchCursor and updates 3 attributes from a different selected feature (sidewalk section) with these values through an UpdateCursor. The tool runs without errors and does what it is supposed to do. However, the changes won't show up in ArcPro unless I either refresh the database (SDE), which is greyed out for the most part, or unless I create any other feature and hit the save button. I then have to clear the selection and re-select the sidewalk segment for the changes made by the tool to appear. I read on different posts that the layer edited by the tool has to be set in the tool parameters as an derived output in order to tell the system that datasets were modified by the script. So I tried that with these output parameters in the tool and this line in my script: arcpy.SetParameter(0, "SidewalkSections") # "SidewalkSections" refers to the layer in the current map that is being edited The tool runs fine, but the output behavior doesn't change. What am I missing here? Thanks for your help! Marc this is the code: import arcpy
sde_conn = r'C:\Users\xxx\AppData\Roaming\ESRI\Desktop10.7\ArcCatalog\sde_MASTER.sde'
p = arcpy.mp.ArcGISProject("CURRENT")
m = p.listMaps("Streets")[0]
layers = m.listLayers()
ap = arcpy.Describe("Address Pts")
sws = arcpy.Describe("Sidewalks/SidewalkSections")
inputAP = ap.FIDset
inputSWS = sws.FIDset
if ";" in inputAP or ";" in inputSWS:
arcpy.AddMessage("Error: select exactly 1 Address point and 1 Sidewalk section")
elif len(inputAP) == 0 or len(inputSWS) == 0:
arcpy.AddMessage("Error: select exactly 1 Address point and 1 Sidewalk section")
else:
query_ap = "OBJECTID in ({0})".format(inputAP)
arcpy.AddMessage(query_ap)
query_sws = "OBJECTID in ({0})".format(inputSWS)
arcpy.AddMessage(query_sws)
with arcpy.da.SearchCursor("Address Pts", ["FullAdd", "ParcelID", "RECORD_NUM"], query_ap) as cursor:
for row in cursor:
ap_fullAdd = row[0]
ap_ParcelID = row[1]
ap_RecordNum = row[2]
edit = arcpy.da.Editor(sde_conn)
try:
edit.startEditing()
edit.startOperation()
with arcpy.da.UpdateCursor("Sidewalks/SidewalkSections", ["Address_ap", "parcelID_ap", "RecNum_ap"], query_sws) as cursor:
for row in cursor:
row[0] = ap_fullAdd
row[1] = ap_ParcelID
row[2] = ap_RecordNum
cursor.updateRow(row)
arcpy.AddMessage("SidewalkSections")
edit.stopOperation()
edit.stopEditing(True)
fc = "{0}\\STREETS\\SidewalkSections".format(sde_conn)
arcpy.SetParameter(0, "SidewalkSections") # "SidewalkSections" refers to the layer in the current map that is being edited
except Exception as err:
arcpy.AddMessage(err)
if edit.isEditing:
edit.stopOperation()
arcpy.AddMessage("operation stopped in except")
edit.stopEditing(False) ## Stop the edit session with False to abandon the changes
arcpy.AddMessage("edit stopped in except")
finally:
# Cleanup
arcpy.ClearWorkspaceCache_management()
... View more
11-21-2019
12:46 PM
|
0
|
2
|
531
|
POST
|
Joe, not sure if you can help me out with this, but I created a python script/tool that copies 3 attributes from a (selected) address point and pastes them into a (selected) sidewalk section through an UpdateCursor. The tool runs without errors and does what it is supposed to do. However, the changes won't show up in ArcPro unless I either refresh the database (SDE), which is greyed out for the most part, or unless I create any other feature and hit the save button. I then have to clear the selection and re-select the sidewalk segment for the changes made by the tool to appear. I read on different posts that the layer edited by the tool has to be set in the tool parameters as an derived output in order to tell the system that datasets were modified by the script. So I tried that with these output parameters in the tool and this line in my script: arcpy.SetParameter(0, "SidewalkSections") # "SidewalkSections" refers to the layer in the current map that is being edited The tool runs fine, but the output behavior doesn't change. What am I missing here? Thanks for your help! Marc
... View more
11-21-2019
09:26 AM
|
0
|
2
|
741
|
POST
|
Joe, that would be my next attempt and will most likely be the route to go. Too bad, I really think that tasks have a lot of potential, but not when they take longer than the manual process they're supposed to replace.
... View more
11-21-2019
05:36 AM
|
0
|
4
|
741
|
POST
|
I ended up following your solution and created a new project and imported everything fro the previous one. The task does indeed run much faster. However, it still takes about 30-40 seconds to copy and paste 3 attributes, so I'm not sure if that will actually speed up my workflow. Manually doing the same thing is still faster..
... View more
11-20-2019
03:04 PM
|
0
|
0
|
1005
|
POST
|
Hi all! So I'm trying out some tasks in Pro to speed up my workflow. I created a simple task that copies 3 attributes from one selected point feature to another one. The first step does the copying, the second step pastes the attributes into a different (selected) point: When I run the task, it takes about 4-5 minutes (!!) to finish. Then I looked at the task history, and the result notes that the task was finished in 10 seconds (!?!?) Why on earth does it take so long to copy attributes and calculate fields? And why does the task history tell me that it took 10 seconds to complete, when it actually took over 4 minutes? What am I missing here? Is the task set up improperly, or is this normal ArcPro behavior? Thanks for your input! Marc
... View more
11-14-2019
09:08 AM
|
0
|
18
|
3026
|
POST
|
Eric, thanks for chiming in. Turns out that the source featureclass had a join with a different table. After removing the join, the reverse geocoding tool carried over all source attributes correctly. So it was indeed a source data issue..
... View more
10-25-2019
06:15 AM
|
1
|
0
|
1117
|
POST
|
Robert, how can it be a source data issue when reverse geocoding the same source in ArcMap works fine, but not in Pro? The output table in Pro carries over all fields from the source, but with the exception of the address fields, all other fields have null values.
... View more
10-23-2019
09:01 AM
|
1
|
0
|
1117
|
POST
|
Hi all! I'm trying to calculate addresses for some of our features, but when I'm using the reverse geocoding tool in Pro, the attributes of the output feature class all have null values, with the exception of the calculated address. I do have the address now, but there's no way to join the geocoded featureclass back to the original featureclass to fill in the addresses. The locator was created in Pro. In ArcMap (10.7), the same process results in a geocoded featureclass that includes all values from the original table. What am I missing here? Is this just another Pro issue? Thanks for your help! Marc
... View more
10-23-2019
08:36 AM
|
0
|
4
|
1240
|
POST
|
hmm.. so this was a test! I'm going to have to tell Matt what you did.... 😉
... View more
07-31-2019
01:08 PM
|
0
|
0
|
367
|
POST
|
Joe, we used them for database replication purposes in the past as well as attaching images to some of our feature classes using collector and the old arcgis app for iOS. We were also evaluating if we should use the GlobalID field as a unique identifier in combination with our new asset management system, but eventually decided against it (except of one feature class). Marc
... View more
07-31-2019
12:29 PM
|
0
|
2
|
367
|
POST
|
Ok, so I think I figured out the problem. I have a test mxd/service with 3 layers: Culinary Water lines Hydrant grid Pressure Zone grid published the mxd with all fields enabled all 3 layers added to webmap --> unable to configure popups remove pressure zone grid layer --> able to configure popups added Pressure Zones layer --> unable to configure popups published mxd with GlobalID field unchecked for pressure zones --> able to configure popups all other layers have their GlobalID field enabled.. double checked and re-enabled GlobalID field for pressure zones, republished service --> unable to configure popup unchecked GlobalID for pressure zones --> able to configure popups So it appears that there is some issue with the GlobalID field for the Pressure Zones layer. Why or what? no idea. If one GlobalID field is causing issues, it denies me to configure popups for any of the layers in the service. I'm not 100% sure if this is the actual issue, but disabling the GlobalID field for that layer fixed the problem. Any thoughts on that? Marc
... View more
07-31-2019
11:00 AM
|
0
|
4
|
367
|
POST
|
Quick update: configuring popups is still not working. Whereas I though it only affects secured layers from our server, the problem still occurs after I made a previously secured layer public (no restrictions). Here's what I tried so far: reset field order in the mxd and republished moved the shape field to the bottom (read that somewhere else that dealt with a similar problem) and republished restarted service restarted the ArcGIS service on our server removed security on layer created a new mxd, published service None of the steps fixed the problem. I'm unable to configure the popup for most of our layers.
... View more
07-31-2019
10:04 AM
|
0
|
0
|
367
|
Title | Kudos | Posted |
---|---|---|
1 | 10-23-2019 09:01 AM | |
1 | 01-20-2017 12:11 PM | |
1 | 01-07-2020 10:08 AM | |
1 | 10-25-2019 06:15 AM | |
1 | 07-03-2019 06:34 AM |
Online Status |
Offline
|
Date Last Visited |
11-20-2023
04:56 PM
|