POST
|
I did tested it on a point feature class in a file geodatabase and it worked for me
... View more
11-04-2021
08:00 AM
|
1
|
3
|
2047
|
POST
|
how about this: Adding the UpdateCursor based on the OBJECTID of your first sorted() fields = ['OBJECTID','GROUPT', 'LABELT','SHAPE@X','SHAPE@Y']
where = f"""GROUPT IS NOT NULL AND TRIM(BOTH ' ' FROM GROUPT) <> ''"""
print(where)
sql_clause = (None, 'ORDER BY GROUPT DESC')
i=0
with arcpy.da.UpdateCursor(fc, fields, where, sql_clause=sql_clause) as ucurs:
ucursSort = sorted(ucurs,key=lambda group : group[4], reverse=True)
for group in ucursSort:
print(group)
current_group = group
try:
if current_group != previous_group:
letter_index = 0
except NameError:
letter_index = 0
new_lbl = ascii_uppercase[letter_index]
print(new_lbl)
#ucursSort.updateRow(group)
where2 = f"""OBJECTID = """+str(group[0])
print(where2)
with arcpy.da.UpdateCursor(fc, fields, where2) as ucursU:
for r in ucursU:
print(r)
r[2] = new_lbl
ucursU.updateRow(r)
letter_index += 1
previous_group = current_group
print("------------------")
... View more
11-04-2021
07:43 AM
|
1
|
6
|
2049
|
POST
|
Hi Vince would this work for you. I tested it and seems like the sorted() reverse=true on the SHAPE@Y field will sort from North to South fields = ['OBJECTID','GROUPT', 'LABELT','SHAPE@X','SHAPE@Y']
where = f"""GROUPT IS NOT NULL AND TRIM(BOTH ' ' FROM GROUPT) <> ''"""
sql_clause = (None, 'ORDER BY GROUPT DESC')
with arcpy.da.UpdateCursor(fc, fields, where, sql_clause=sql_clause) as ucurs:
ucursSort = sorted(ucurs,key=lambda group : group[4], reverse=True)
for group in ucursSort:
print(group)
current_group = group
try:
if current_group != previous_group:
letter_index = 0
except NameError:
letter_index = 0
new_lbl = ascii_uppercase[letter_index]
#ucurs.updateRow([group, new_lbl])
letter_index += 1
previous_group = current_group
... View more
11-04-2021
07:05 AM
|
0
|
9
|
2053
|
POST
|
Hey I am curious, what version of ArcGIS Server are you running? I have a similar issue on one of our server running 10.6.1. Thanks!
... View more
11-03-2021
06:26 AM
|
0
|
1
|
1336
|
POST
|
Hi AspenN is your feature layer hosted on an ArcGIS Server or ArcGIS Online? if it's on an ArcGIS Server you could enable WFS from the Server Manager
... View more
11-02-2021
07:57 AM
|
0
|
1
|
1010
|
POST
|
Hello, for me all me SDE connections are in the same folder (workspace) so if you define the workspace, you should get your listing of SDE databases. Worked for me. 🙂 (in Catalog, right click the SDE connection, select properties and look at the path of the "name") import arcpy
arcpy.env.workspace = r"C:\Users\USERNAME\AppData\Roaming\ESRI\Desktop10.8\ArcCatalog"
# List all file geodatabases in the current workspace
workspaces = arcpy.ListWorkspaces("*", "SDE")
for workspace in workspaces:
print workspace
... View more
10-29-2021
12:23 PM
|
0
|
0
|
2595
|
POST
|
those little things 🙂 FYI, if you try to use that expression in Fields Maps... it won't work..I have been working with ESRI Tech Support on that and this morning they logged it as a bug (I was using almost the same code to bring attachments in the popup) Reference number:- BUG-000144024 Public Status:- New Synopsis:- The arcade expression to count the number of attachments fails to honor in the ArcGIS Field Maps.
... View more
10-27-2021
09:25 AM
|
2
|
0
|
2135
|
POST
|
code looks good, are you sure your "expression" is listed in your list of pop-ups fields?
... View more
10-26-2021
02:01 PM
|
0
|
2
|
2162
|
POST
|
Hi Keith can you click the "+" sign then the list of values will be generated and you can select what ever you want.
... View more
10-25-2021
11:37 AM
|
1
|
1
|
859
|
POST
|
perhaps there is an issue with the formula. Other things to keep in mind. 1) make sure you have all options available when creating the symbology (in my case I don't have records with value 'test2' yet therefore it's not an option when creating the symbology) 2) Otherwise, make sure to select the Other option it should work. Good luck!
... View more
10-22-2021
02:50 PM
|
0
|
0
|
3320
|
POST
|
Hey Martha sorry I didn't read your question correctly. I don't thing the "missing" field will be re calculated automatically. You will have to do that manually. What you could do that would be dynamic is to create a symbology expression using that arcade code and have the symbology based on that "formula". Then if you update PlotNo, that will affect the code therefore the symbology. Then you could update the missing field a few time a day. Only the symbology and pop-up would be dynamic with the Arcade expression
... View more
10-22-2021
12:02 PM
|
0
|
0
|
3327
|
POST
|
hummm I just tested it here using the following code var drTest = $feature.testDefaultValue;
var drNewVal = When(
drTest =='dr_test',"Code1",
drTest =='test1',"Code2",
"complete"
)
return drNewVal; and that got me this:
... View more
10-22-2021
11:44 AM
|
0
|
0
|
3328
|
POST
|
Hey Martha once you load you data in AGOL, create an Arcade expression using this code. Let me kn ow if you have any questions. var plotno = $feature.PlotNo;
var activity = $feature.Activity;
var AllowdHei = $feature.AllowedHei;
var missing = When(
IsEmpty(plotno) && IsEmpty(activity) && IsEmpty(AllowdHei),"Plotno, Activity, AllowedHeight",
IsEmpty(plotno) && IsEmpty(activity) && !IsEmpty(AllowdHei),"Plotno, Activity",
IsEmpty(plotno) && !IsEmpty(activity) && !IsEmpty(AllowdHei),"Plotno",
!IsEmpty(plotno) && IsEmpty(activity) && IsEmpty(AllowdHei),"Activity, AllowedHeight",
!IsEmpty(plotno) && IsEmpty(activity) && !IsEmpty(AllowdHei),"Activity",
IsEmpty(plotno) && !IsEmpty(activity) && IsEmpty(AllowdHei),"Plotno, AllowedHeight",
!IsEmpty(plotno) && !IsEmpty(activity) && IsEmpty(AllowdHei),"AllowedHeight",
"Complete"
);
return missing;
... View more
10-22-2021
06:40 AM
|
0
|
3
|
3350
|
POST
|
Hey Kevin could you try to use a Notebook in ArcGIS Pro? I do something similar but my source is a AGOL hosted feature layer.
... View more
10-20-2021
08:50 AM
|
0
|
0
|
1589
|
POST
|
Hey Robert what if you try this. That should give you a "clean" name for your FGDB for fd in datasetList:
print(fd)
fdSplit = fd.split('.')
print(fdSplit[2])
arcpy.CreateFeatureDataset_management(outFolderPath, fdSplit[2])
... View more
10-20-2021
07:19 AM
|
0
|
0
|
866
|
Title | Kudos | Posted |
---|---|---|
1 | Tuesday | |
1 | 09-18-2024 07:44 AM | |
1 | 10-14-2021 10:59 AM | |
1 | 07-11-2024 08:04 AM | |
2 | 06-27-2024 07:08 AM |
Online Status |
Offline
|
Date Last Visited |
Friday
|