|
POST
|
I've been an ESRI user continuously since 1990 and have seen a number of software rebuilds along the way. It's been nearly two years since I've used ArcGIS Pro exclusively; I think this is the best I've seen. Never look back....
... View more
08-24-2021
01:16 PM
|
2
|
0
|
2872
|
|
POST
|
I have similar rules with my site address points. That's something I've wrestled with as well, firing rules upon editing the feature, regardless of how small an edit it is. The best I've come up with is to disable the rule, make your edits and then re-enable the rule when you're done.
... View more
08-24-2021
08:27 AM
|
1
|
2
|
4180
|
|
POST
|
You might have to go into the aprx then and re-insert the new name table to get the the new alias name. I don't do much in the lines of mapping. I'm just a simple data miner.....
... View more
08-23-2021
03:09 PM
|
0
|
0
|
5367
|
|
POST
|
If your data is in a FGDB why bother testing on a shapefile?
... View more
08-23-2021
02:44 PM
|
0
|
1
|
2065
|
|
POST
|
I created a shapefile just to try what you are doing I get really weird results in a SQL select window. I bet I haven't created a shapefile in over 10 years, and this is one of the reasons why:
... View more
08-23-2021
02:26 PM
|
0
|
1
|
2067
|
|
POST
|
Take a closer look at the online help page. Like other arcpy tools, this one creates an Object, and you have to tease the properties out of that object to make sense of it. The help page gives a good example of mixing arcpy along with the os module in python to get what you are after.
... View more
08-20-2021
11:57 AM
|
1
|
0
|
2654
|
|
POST
|
I don't see where you actually make a feature layer after line 3 in the first code block. Edited moments later: are you really using a shape file, because they don't support <Null> values....
... View more
08-20-2021
10:23 AM
|
1
|
1
|
2098
|
|
POST
|
In the the first sequence you haven't done anything to the original value of your variable 'cmts'. You do in the second sequence. Very cool. var cmts = $feature.Comments
var Uc = Upper(cmts)
return Uc; Here I create a new variable and return it. Not as cool. No need to create a variable because you use the object properties.
... View more
08-19-2021
02:36 PM
|
0
|
0
|
3310
|
|
POST
|
for lyr in lyrList: if lyr.isFeatureLayer: a for-loop. It reads if a layers in the lyrList is a feature layer it gets stored as Boolean (T/F) in lyr? Not really. You need to do something when an if statement evaluates to True or False.... aprx = arcpy.mp.ArcGISProject("CURRENT")
m = aprx.activeMap
lyrList = m.listLayers()
len(lyrList)
# returns 11
for i in lyrList:
print(i)
Address Points
Site Addresses
Subdivisions_MSD
MSD.SLCOMSD.AddressGridMSD
RoadCenterline All
CenterlinesMSD
MunicipalitiesMSD
MSD.SLCOMSD.ParcelsMSD
MSD.SLCOMSD.Zones
ZipcodesMSD
World Imagery
for i in lyrList:
if i.isFeatureLayer:
print('yay')
''' returns
yay
yay
yay
yay
yay
yay
yay
yay
yay
yay
''' Notice that while the length of my layer list = 11, when the if statement evaluates true, 'yay' is only printed 10 times. That's because the entry 'World Imagery' is not a feature layer. Use an else to capture that: for i in lyrList:
if i.isFeatureLayer:
print('yay')
else:
print(f'{i} is not a feature layer')
''' returns
yay
yay
yay
yay
yay
yay
yay
yay
yay
yay
World Imagery is not a feature layer
'''
... View more
08-19-2021
02:23 PM
|
0
|
0
|
2512
|
|
POST
|
In the code below, I concatenate a bunch of attributes and then use the proper() function to make the final text pretty. Use the upper () function instead in line 12... var values = [$feature.NAME, $feature.POSTTYPE, $feature.POSTDIR]
var combined_value = [];
// Loop through the field values and test if they are null or empty strings
// If they are not null or empty add them to an array
for (var i in values) {
var value = values[i];
if (IsEmpty(value)) continue;
combined_value[Count(combined_value)] = value
}
// Return the field values concatenated with a space between
return proper(Concatenate(combined_value, " ")); This fires on Insert and Update.
... View more
08-19-2021
12:11 PM
|
1
|
0
|
3317
|
|
POST
|
08-19-2021
11:31 AM
|
1
|
0
|
2993
|
|
POST
|
I've never added a python window that way, but I have a python window open by going to the View Tab, and clicking on Python Window. I didn't need to import arcpy.
... View more
08-19-2021
10:59 AM
|
0
|
0
|
5145
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-11-2018 07:12 AM | |
| 1 | 05-17-2021 11:18 AM | |
| 1 | 06-29-2021 11:42 AM | |
| 1 | 07-05-2012 07:49 AM | |
| 1 | 09-03-2016 06:16 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-19-2026
11:56 AM
|