POST
|
Purpose: Edit a versioned feature class within a Feature dataset in order to calculate a field I have a field called Date to store the date of the inspection (data type: date) I have another field called Time_Diff (data type: Long). This field is the one that will be used to calculate the time difference between system date and the date recorded in the Date field. The script keeps failing due to the following runtime error: RuntimeError: cannot open workspace Any assistance will be greatly appreciated. # Import arcpy module
import arcpy
# Local variables:
Input_MapChangeRequest = "Database Connections\\GISHW.sde\\gishw.PU.HW_FieldCollection\\gishw.PU.MapChangeRequest"
MapChangeRequest_Layer = "MapChangeRequest_Layer"
MapChangeRequest_layer2 = MapChangeRequest_Layer
MapChangeRequest_Layer__3_ = MapChangeRequest_layer2
# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(Input_MapChangeRequest, MapChangeRequest_Layer, "", "", "OBJECTID OBJECTID VISIBLE NONE;UTILITY UTILITY VISIBLE NONE;ISSUE ISSUE VISIBLE NONE;ASSET ASSET VISIBLE NONE;CRITICAL CRITICAL VISIBLE NONE;NOTES NOTES VISIBLE NONE;STATUS STATUS VISIBLE NONE;REPORTER REPORTER VISIBLE NONE;DATE DATE VISIBLE NONE;SHAPE SHAPE VISIBLE NONE;created_user created_user VISIBLE NONE;created_date created_date VISIBLE NONE;last_edited_user last_edited_user VISIBLE NONE;last_edited_date last_edited_date VISIBLE NONE;GlobalID GlobalID VISIBLE NONE;Time_Diff Time_Diff VISIBLE NONE")
# Process: Change Version
arcpy.ChangeVersion_management(MapChangeRequest_Layer, "TRANSACTIONAL", "ARCGIS_SERVER.PU_web_editing", "")
# Start an edit session. Must provide the workspace.
edit = arcpy.da.Editor(MapChangeRequest_Layer)
# Edit session is started without an undo/redo stack for versioned data
edit.startEditing(True)
# Start an edit operation
edit.startOperation()
# Process: Calculate Field
arcpy.CalculateField_management(MapChangeRequest_layer2, "Time_Diff", "(datetime.datetime.now() - arcpy.time.ParseDateTimeString( !DATE! )).days", "PYTHON_9.3", "")
# Stop the edit operation.
edit.stopOperation()
# Stop the edit session and save the changes
edit.stopEditing(True)
... View more
04-04-2016
09:38 AM
|
0
|
10
|
11051
|
IDEA
|
I have been using lately the tools and scripts provided here: https://geonet.esri.com/docs/DOC-6496. https://geonet.esri.com/servlet/JiveServlet/download/6496-6-153147/Download%20Service.zip This is a great to download the data with attachments from a hosted service for ArcGIS Online or ArcGIS for Server. I did find a gap with this tool and therefore did not fulfill all my needs. I believe there are also people out there that will also encounter this same issue. I am using this tool to download data along with its attachments from a feature service used by a team collecting data in the field. They are in the field every other day collecting the data with a form I created using Survey123. Our in-house workflow is set to download this data every other night with the purpose of processing the data and then appending it to an existing main database with the same structure (fields, layers, domains, among others). The data from this main database is then re-published to overwrite an existing service that displays this data. I believe this tool has a lot of potential but I have found some flaws: 1. Its output is not consistent. It generates a GlobalID_str field which sometimes get populated. Sometimes it is returned as Null values. 2. Sometimes the tool will only download only one picture even though there are many associated to the particular point. 3. This third point I believe is critical for me and others, and is one of the reasons I stated it did not fit all my needs. When the data was appended to the main geodatabase, the GlobalIDs form both, the Feature Class and the Attach tables were changed during the process. The relationship between them got lost in the process affecting the attachment relationships. There must be a way to overcome this issue since field collecting processes may cover days if not months, and this process will happen a lot during that period. Please, keep on extending this amazing and useful toll and add it to the enhancement list for a future release. I know there will be a lot happy GIS users around the world with this implementation. Kind regards. Ernesto
... View more
02-13-2016
08:12 AM
|
7
|
0
|
1396
|
POST
|
I am trying to use the script tool available with the ArcREST-3.0.1 package but not sure why is not working as I expected (the package has been successfully installed already). As far as I understood, it should append new data to an existing feature service. I have already a service published in my organization account. The data that I want to append has the same database structure along with some attachments. After providing username/password, organization URL, FS Item ID, layer name and source table (the new data I want to include to the existing FS), the tools seems to execute without any issues. Once I check the service, the data is not there. Anything I am missing here? Thanks in advanced.
... View more
02-13-2016
07:48 AM
|
0
|
2
|
4305
|
POST
|
I am using Survey123 to publish the Feature Service and following the instructions as described in the blog and documentation. I am sharing it with the Field Crew group that I created in my Organization, as well as my organization. I am enabling the Sync function as well. I am planning on downloading the data every other day using the script to load it into a temporary database which then appends it to the main database of the same structure (feature class, table, and relationships, and domains). In this process, I append both the geometry and the table record. After this, I use the main database to overwrite an existing map service, and later delete the rows from the feature service generated with Survery123 in order to avoid duplicates the next time the script is executed. Issue and Findings: I have tested the script as a script model and as a python script and the same behavior occurs randomly. Sometime it works but after a few successful runs, it starts failing again. I have also tested creating & downloading the FileGDB from ArcGIS Online. The attachments work as expected – something that was not acquired with the scripts mentioned above – but when appended to another FC, the same corrupted behavior is experienced. Also, the attachments won’t work anymore. Another issue is, after testing the download with attachment script, the GlobalID_Str value started to become Null after a few test runs. Also, the match table is empty. GlobalID changes when the downloaded layer with attachments is appended to another FC. see - Original FC see - Append FC The same behavior occurs with the __ATTCH table see - Original Table see - Append Table Tools and more info: https://community.esri.com/docs/DOC-6496 https://community.esri.com/servlet/JiveServlet/download/6496-6-153147/Download%20Service.zip
... View more
02-12-2016
12:13 PM
|
0
|
0
|
1614
|
POST
|
I installed ArcREST as specified via command prompt successfully using python setup.py install command from the directory. When running the tool Delete Data from Feature Service, either using the script tool or python IDLE, the tool fails. ImportError: No module named six
... View more
02-08-2016
10:40 AM
|
0
|
1
|
2113
|
POST
|
It is shared within an a group of an organization. For troubleshooting, I will open it to Everyone. Can I email it to you instead? I just sent an email to JSkinner@esri.com
... View more
02-05-2016
12:21 PM
|
0
|
0
|
291
|
POST
|
Jake Skinner Hi Jake, thanks for your reply. I downloaded the scripts and configured them. I had them working properly until this morning when I noticed that even though the data is been downloaded including the photos, the _ATTACH table is not been populated accordingly. Not sure what may be happening since it was working previously.
... View more
02-05-2016
12:02 PM
|
0
|
2
|
291
|
POST
|
Owen Evans I am having trouble on line 46 from the section where the replica is created and the Feature Service URL is updated. Attaching image for more descriptive information. Lines 36 & 46 have the same URL as the input...not sure if that is setup properly here. Any assistance will be greatly appreciated. Ernesto
... View more
02-02-2016
11:30 AM
|
0
|
4
|
2015
|
POST
|
Is there anything else that needs to be done for the pictures to get attached to the collected feature? I followed the instructions as described above and in the help, but when I send the survey back to the feature service, and download the layer as a SHP or FGDB, the images are not being downloaded with it. Also they won't display in AGOL.
... View more
01-26-2016
01:13 PM
|
0
|
6
|
1966
|
POST
|
Are there any known compatibility issues between the Search widget and Internet Explorer browsers? Specifically IE9 and IE11 The issue is that the Quick Address Search is not displaying with these versions of the browser. With Internet Explorer: With Chrome: I have attached suggested IE config settings. It seems to work sometimes but not in all cases.
... View more
06-19-2015
10:20 AM
|
0
|
0
|
2286
|
POST
|
Any help will be appreciated. I am trying to make this work but have not succeeded yet, though I was able to host the .CSV table in an app server that has access to the GIS site and the process executed fine. Now, I want to change the parameter to be a GPRecordSet to replicate my table definitions but have not succeeded. I noticed the following Help reference: http://resources.arcgis.com/en/help/main/10.2/index.html#/Task_parameter_properties_REST/005700000070000000/ For GPRecordSet and GPFeatureRecordSetLayer parameters, if you have a large number of records and features, you can store the JSON structure in a file and provide the URL as an input. For example, { "url" : "http://myserver/myfeatures/afile.txt"}. The text file must have featureset or recordset in JSON format. I think this also destroys my intention on trying to use the JSON format since my table definition can have thousands or records. Any suggestions?
... View more
06-02-2015
06:52 AM
|
0
|
4
|
3839
|
POST
|
Hi, I had successfully configured the System Monitor 1.1.4 with ArcGIS for Server 10.2.1. I recently migrated our environments to 10.3 and started to get this error message. Any guidance will be appreciated. Thank you, Ernesto @esri
... View more
05-05-2015
05:29 AM
|
0
|
2
|
3139
|
POST
|
My issue should be fixed with http://support.esri.com/en/downloads/patches-servicepacks/view/productid/160/metaid/2186
... View more
04-08-2015
07:50 AM
|
0
|
0
|
286
|
Title | Kudos | Posted |
---|---|---|
1 | 11-19-2014 07:02 AM | |
1 | 02-06-2014 08:06 AM | |
7 | 02-13-2016 08:12 AM | |
1 | 02-16-2015 08:10 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|