|
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
|
4642
|
|
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
|
3220
|
|
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
|
3247
|
|
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
|
1924
|
|
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
|
6309
|
|
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
|
6316
|
|
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
|
6317
|
|
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
|
6339
|
|
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
|
3337
|
|
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
|
2023
|
|
POST
|
try this: for dataset in arcpy.ListDatasets("", "Feature"):
print (dataset)
for fc in arcpy.ListFeatureClasses(feature_dataset=dataset):
print(" " +fc)
... View more
10-20-2021
07:00 AM
|
0
|
0
|
1903
|
|
POST
|
Hey Jae I think if you create a schema.ini file in the same folder as your txt (csv) file that should work. I just tested it and it's working for me. Good luck! [tab2tab2.csv] Format=CSVDelimited ColNameHeader=True Col2=num1 Text Width 30 Col3=num2 Text Width 30
... View more
10-19-2021
07:16 AM
|
0
|
1
|
2175
|
|
POST
|
Hey Paul Not sure if you solved your problem but I have a script that does exactly what you are trying to accomplish Let me know if you have any questions (in my case I had to filtered for start and end dates but you can remove that) def main(): import arcpy from arcpy import da import os inTable = "Database Connections\\[email protected]\\coa_working.COA_GIS.Parcels_point_edit_assessor__ATTACH" ##inTable=arcpy.GetParameterAsText(0) fc = "Database Connections\\[email protected]\\coa_working.COA_GIS.Parcels_point_edit_assessor" ##fc = arcpy.GetParameterAsText(1) fldRelatedInfo = 'PARCELID' # should be valid column in FC ##fldRelatedInfo = arcpy.GetParameterAsText(2) fileLocation = "d:\\temp\\assessor\\Attch_input" ##fileLocation = arcpy.GetParameterAsText(3) ##print fileLocation #dStartDate = arcpy.GetParameterAsText(4) dStartDate = '10/01/2019' #dEndDate = arcpy.GetParameterAsText(5) dEndDate = '03/15/2020' expresDate = "[last_edited_date]>='" + dStartDate + "' and [last_edited_date]<'" +dEndDate + "'" print expresDate ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## ##Sterp 1: ## ##Query records that are between the selected dates ## print "Entering FC search records between dates" ## ##expresDate = "[PicTaken] = 'Yes' and [last_edited_date]>='" + dStartDate + "' and [last_edited_date]<'" +dEndDate + "'" ## print expresDate with da.SearchCursor(fc, ['GlobalID', 'PARCELID'],where_clause=expresDate) as cursor: NewRec = [] multipleVals = {} rowcountNewRec = 0 for item in cursor: ##Initial counter ##print item[0] tmf = {item[0]:item[1]} multipleVals.update(tmf) NewRec.append(item[0]) rowcountNewRec = rowcountNewRec+1 print len(NewRec) ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##Sterp 2: ##Query records from the attached table that matches the previous selection print "Entering Attachment Searchcursor" ##Search from the attachment table for itemAttch in multipleVals: ##print "--------------- " + itemAttch + " ---- " + multipleVals[itemAttch] attExpression = arcpy.AddFieldDelimiters(inTable, 'REL_GLOBALID') + " = '{0}'".format(itemAttch) print attExpression with da.SearchCursor(inTable, ['DATA', 'ATT_NAME', 'ATTACHMENTID', 'REL_GLOBALID'], where_clause=attExpression) as cursor: filesNew = [] rowcount = 1 for item in cursor: ##Initial counter relOID = item[3] print relOID ##Check to see if the selected records in the List created from the date range if relOID in NewRec: print "We found a new picture -- " + relOID else: print "-- Not relevent" ##print rowcount ##Check to see if the record already has a picture, if it does find the # and assigned the if relOID in filesNew: filesNew.append(relOID) iCount = filesNew.count(relOID) rowcount = iCount else: rowcount = 1 filesNew.append(relOID) # access related information... Choose Geocode or parcelid???? print "looking for related info" ##myRelatedInfo = QueryRelatedData(fc, fldRelatedInfo, relOID) myRelatedInfo = multipleVals[itemAttch] print "****** " +myRelatedInfo attachment = item[0] filename = myRelatedInfo + "-0" + str(rowcount) + ".jpg" ##filenum + str(item[1]) print filename ##Save JPG in a folder open(fileLocation + os.sep + filename, 'wb').write(attachment.tobytes()) print "File has been created" del filename del attachment if __name__ == '__main__': main() ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ should return something like this (PARCELID-XX.jpg) XX=number of attachments)
... View more
10-14-2021
02:42 PM
|
0
|
0
|
1227
|
|
POST
|
you still should have C:\Python27\ArcGIS10.6\Lib\site-packages then open the Desktop10.6.pth with notepad I am using 10.8 and got this C:\Python27\ArcGIS10.8\Lib\site-packages\Desktop10.8.pth
... View more
10-14-2021
11:18 AM
|
0
|
0
|
1867
|
|
POST
|
look at this link in the Paths and import section https://desktop.arcgis.com/en/arcmap/10.6/analyze/python/importing-arcpy.htm
... View more
10-14-2021
11:06 AM
|
0
|
2
|
7296
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 weeks ago | |
| 13 | 06-29-2026 12:07 PM | |
| 1 | 03-26-2026 01:47 PM | |
| 1 | 08-05-2024 06:19 AM | |
| 1 | 06-11-2025 08:07 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|