|
POST
|
See if this post to Stack Exchange helps you out; it suggests adding a new fields that would be an epoch representations (number value) of your date modified. You might be able to write an attribute rule that would update that new field when a feature is modified. You can also check the Arcade help pages on date epoch here.
... View more
11-08-2021
03:02 PM
|
2
|
2
|
1666
|
|
POST
|
Five minutes in the ESRI Arcade playground and I came up with this: var name = ' R3-1';
Console(name)
var nameArray = Split(name,'-')
Console(nameArray)
var arrayLength = Count(nameArray)
Console(arrayLength)
if (arrayLength == 2) {
Console(nameArray[0])
} The Console() function is like the print() function in python, but it only works in the playground. This is nothing more than python logic in Arcade...
... View more
11-05-2021
12:38 PM
|
0
|
0
|
1723
|
|
POST
|
Another approach: split the string at the dashes into an array and then get the count of that array. If the count indicates 1 dash, grab the first element of the array; if the count indicates 2 dashes, grab the second element of the array. I'm pretty sure arcade arrays are 0 based.
... View more
11-05-2021
12:18 PM
|
0
|
0
|
5011
|
|
POST
|
I thought this is in the context of an Attribute Rule; in that case Arcade is the only option.
... View more
11-05-2021
12:02 PM
|
0
|
1
|
5015
|
|
POST
|
This help page seems to imply you can just export a single layout to just about whatever image format you like. The arcpy.mp module does takes a little getting used to.
... View more
11-05-2021
08:50 AM
|
1
|
0
|
7926
|
|
POST
|
Depending on your needs, you might want to wrap your geoprocessing functions within a Try/Except block. We have several scripts that we run in off hours so if something goes south, we like to get an email telling us so. The except block invokes the sendEmail() def. We also like to log all the processes so we can see what worked and what didn't: def createAliasTable(msdCenterlines,centerlinesAlias,logoutput):
defName = 'Create Alias Table'
try:
select = "NAME >= 'A'"
arcpy.management.MakeFeatureLayer(msdCenterlines, 'centerlinesLyr', select)
arcpy.TruncateTable_management(centerlinesAlias)
arcpy.management.Append('centerlinesLyr',centerlinesAlias,'NO_TEST')
createTime = time.strftime('%Y-%m-%d %H:%M:%S')
logoutput.write(f'Success: completed {defName} at {createTime}\n')
except Exception as err:
failTime = time.strftime('%Y-%m-%d %H:%M:%S')
logoutput.write(f'Failure: Unable to complete {defName} at {failTime}\n ')
logoutput.write(f'{err}\n')
sendEmail(err) Using the try/except approach, if the script tosses an error somewhere along the line, it won't totally blow up and shut down. We standardize all of our scripts with geoprocessing defs and call them from the main def, passing variables as arguments/parameters set there. def main():
logFile = r"N:\GIS\Scripts\Logs\CreateCityWorksLocator.txt"
if os.path.exists(logFile):
os.remove(logFile)
logoutput = open(logFile,'a')
startUp(logoutput)
#set input parameters for various defs()
ws = r'N:\GIS\Geocoding\CityWorksLocators\GeocodingData.gdb'
sde = r'\\path\to\connectionFile\SLCOmsd@MSD.sde'
municipalities = f'{sde}\MSD.SLCOMSD.MunicipalitiesMSD'
centerlinesAlias = f'{ws}\CenterlinesMSD_Alias'
locatorDir = r'N:\GIS\Geocoding\CityWorksLocators\Locators\Joes'
parcels = r'J:\ConnectionFile\aDifferent.sde\MSD.SLCOMSD.SLCo_Parcels'
slcoCenterlines = f'{sde}\MSD.SLCOMSD.SLCo_Centerlines'
slcoAddressPoints = f'{sde}\MSD.SLCOMSD.SLCo_AddressPoints'
msdCenterlines = f'{sde}\MSD.SLCOMSD.CenterlinesMSD'
msdAddressPoints = f'{sde}\MSD.SLCOMSD.SiteAddressPointsMSD'
msdFgbAddressPoints = f'{ws}\SiteAddressPointsMSD'
#call the defs comment out as needed for testing purposes
#arcelsToFGDB(parcels,ws,municipalities,logoutput)
#createParcelLocator(parcels,locatorDir,logoutput)
#createNonMsdParcelLocator(ws,locatorDir,logoutput)
#createAliasTable(msdCenterlines,centerlinesAlias,logoutput)
#nonMsdAddressPoints(ws,slcoAddressPoints,municipalities,logoutput)
#nonMsdCenterlines(ws,slcoCenterlines,municipalities,logoutput)
#nonMsdLocator(ws,locatorDir,logoutput)
#createMsdAddressPoints(ws,msdAddressPoints,logoutput)
#msdLocator(ws,centerlinesAlias,msdFgbAddressPoints,msdCenterlines,locatorDir,logoutput)
compositeLocator(locatorDir,logoutput)
if __name__ == '__main__':
main() Notice that all the calls to the various defs are commented out; with a modular approach, you can only run the defs you want to.
... View more
11-05-2021
08:44 AM
|
0
|
0
|
1748
|
|
POST
|
All of us get this email from time to time, and often times I find myself in the position wanting to respond with something like: 'As a matter of fact, no; but I came up with a work around..." I'm not one to check my own responses as the accepted solution, but I wonder if there is a way to utilize the feed back loop to allow a response similar to what I mention.
... View more
11-05-2021
07:53 AM
|
0
|
4
|
1302
|
|
POST
|
I think you can just create a series of relationship classes between your polygons and tables and then publish the whole thing. You might want to consider migrating to ArcGIS Pro, I think it works better than ArcMap when dealing with AGOL.
... View more
11-05-2021
07:42 AM
|
0
|
0
|
771
|
|
POST
|
@CBeck - Personally, I wouldn't go back to the old style locators and ArcMap. Truth is the agency I work for is strictly a Pro shop... When I created this original post, I was using Pro 2.6 and I'm now using 2.8.2. I don't recall every getting the error message since I created this post. What version of Pro are you using, and what style of locators? What is the source of the data you are matching to?
... View more
11-05-2021
07:37 AM
|
0
|
0
|
2361
|
|
POST
|
A few of suggestions before going any further. First; it's your best interest to leave shapefiles behind and use file geodatabase feature classes instead. Second; provide the rest of you code, as the little snippet provided isn't enough to grasp the situation. Third; be sure you are using the arcpy.da.SearchCursor and not the old style cursors.
... View more
11-04-2021
03:17 PM
|
2
|
0
|
569
|
| 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-28-2025
05:02 PM
|