|
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
|
1110
|
|
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
|
1651
|
|
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\\DATABASENAME@DIRECTCONNECT.sde\\coa_working.COA_GIS.Parcels_point_edit_assessor__ATTACH" ##inTable=arcpy.GetParameterAsText(0) fc = "Database Connections\\DATABASENAME@DIRECTCONNECT.sde\\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
|
753
|
|
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
|
1233
|
|
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
|
5664
|
|
POST
|
Hey pmccord, for your first question, I had a similar problem and I solved it with the following flow: 1) I exported the Notebook to python 2) In SQL Server, I created a SQL Server Agent job to run my script 3) In SQL Server, I created a Stored Procedures to trigger the SQL Agent job created @ previous step 3) In MS Power Automate I created a flow to manually trigger the stored procedures created @ previous step 4) have the end users install the Power Automate App on their phone and push the button to reset their data any time they need to. if this is something that could work for you, I would be more than happy to share the flow in details with screenshots. Good luck! D
... View more
10-14-2021
10:59 AM
|
1
|
1
|
2245
|
|
POST
|
humm interesting. Can You open the py file using the IDLE try to run it see if you are getting any error messages. (right click on the file and select Edit with IDLE). I use this all the time and it works on desktop and servers
... View more
10-14-2021
10:32 AM
|
0
|
4
|
5670
|
|
POST
|
Perhaps you could try this format in your BAT file: "C:\Python27\ArcGIS10.6\python.exe" "C:\Users\jstout\Desktop\PY\MorningProcess\morningprocess.py"
... View more
10-14-2021
09:56 AM
|
1
|
9
|
5681
|
|
POST
|
Hello, I know it's an old post, but I am having the same issue as described above.... what could be the cause?
... View more
10-14-2021
06:40 AM
|
0
|
0
|
1640
|
|
POST
|
Hello I am trying to import a CSV file into an AGOL Hosted feature table. My Input has 4 fields: DateRead, readValue,Tower and UID basic model but my output doesn't return the Date info I have tried this date format without success Any help would be much appreciated. thanks! D
... View more
06-29-2021
01:26 PM
|
0
|
2
|
1520
|
|
POST
|
hello Survey123 people. I created a survey using Survey 123 Connect 3.12.232 to track Volunteer registration. I have a few fields for Check In and Check Out. When the Volunteer first register those 2 fields are blank (NULL) and later on they can comeback and check in or out. I added a basic JavaScript function (see below) to assign the "status' of the volunteer (Register, Checked In, Checked Out). As you can see on my images, everything seems to be working fine in design mode and mobile (IOS using Arcgis Survey 123) BUT when using the same survey online, the status value is always "Checked Out". Is there a different way to handle DATE field ? Any help would be much appreciated Thanks! Dominic *************************************************************** function drStatus(datein, dateout) { if (datein === null && dateout === null) return 'Register'; else if (datein !== null && dateout === null) return 'Checked In'; else if (datein !== null && dateout !== null) return 'Checked Out'; }
... View more
06-04-2021
12:22 PM
|
0
|
3
|
2242
|
|
POST
|
Hello I believed I solved my problem related to the error 3079 Domain already exists. In my feature class, I had a Domain with a special character in the name (Yes/No as name).... I renamed to Yes_No , all my fields using that domain got updated, I refreshed my map service and I was able to load my web map in Collector and Field maps without issues. Good luck! D
... View more
05-20-2021
07:24 AM
|
4
|
4
|
2205
|
|
POST
|
Hello Mindy were you able to solve your problem with tech support? I am experiencing the same type of issue, with a map service and web map that has been working for years... I do have an open ticket with Support as well but I am curious has how other users solve this issue. Thanks!
... View more
05-19-2021
07:03 AM
|
0
|
5
|
2212
|
|
IDEA
|
Same here. Some of our Assignments have multiple tasks executed by multiple crews. So Dispatcher would create the initial assignment (TASK A to crew A). Once crew A complete Task A, they would assigned Task B to crew B and so on. So having the Work Name and assignment Type in the assignment feature layer would help a lot.
... View more
04-29-2021
08:23 AM
|
0
|
0
|
785
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-05-2024 06:19 AM | |
| 1 | 06-11-2025 08:07 AM | |
| 1 | 07-13-2025 04:58 PM | |
| 1 | 02-27-2025 08:13 AM | |
| 1 | 11-05-2024 06:51 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|