|
POST
|
Thank you for the help! It's very much appreciated.
... View more
05-09-2023
07:02 AM
|
0
|
0
|
2353
|
|
POST
|
Hi yall, I'm just starting to learn about python and notebooks and I'm attempting to use a series of arcpy tools to create a price calculation tool for some line layers. I won't go to far into the full details, but at the moment I'm having issue's with arcpy.management.CalculateField. So we'll get to it. Here's my code (specifics removed to protect the innocent): from arcgis.gis import GIS
gis = GIS("home")
from arcgis.features import FeatureLayer
import arcpy
#next cell
line_url = ("https://services8.arcgis.com/desired/line/layer/etc")
Line = FeatureLayer(line_url)
#next cell
arcpy.management.CalculateField(in_table=Line, field="$feature.Key", expression="$feature.Value1 + $feature.Value2", expression_type="ARCADE")[0] And here is the error. ---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Input In [56], in <cell line: 9>()
----> 9 arcpy.management.CalculateField(in_table=Line, field="$feature.Key", expression="$feature.Value1 + $feature.Value2", expression_type="ARCADE")[0]
File /opt/conda/lib/python3.9/site-packages/arcpy/management.py:5788, in CalculateField(in_table, field, expression, expression_type, code_block, field_type, enforce_domains)
5786 return retval
5787 except Exception as e:
-> 5788 raise e
File /opt/conda/lib/python3.9/site-packages/arcpy/management.py:5785, in CalculateField(in_table, field, expression, expression_type, code_block, field_type, enforce_domains)
5783 from arcpy.arcobjects.arcobjectconversion import convertArcObjectToPythonObject
5784 try:
-> 5785 retval = convertArcObjectToPythonObject(gp.CalculateField_management(*gp_fixargs((in_table, field, expression, expression_type, code_block, field_type, enforce_domains), True)))
5786 return retval
5787 except Exception as e:
File /opt/conda/lib/python3.9/site-packages/arcpy/geoprocessing/_base.py:512, in Geoprocessor.__getattr__.<locals>.<lambda>(*args)
510 val = getattr(self._gp, attr)
511 if callable(val):
--> 512 return lambda *args: val(*gp_fixargs(args, True))
513 else:
514 return convertArcObjectToPythonObject(val)
RuntimeError: Object: Error in executing tool I'm thinking that it's an issue with how I pull the layer into the notebook, but have no idea what is actually happening. Thanks in advance for your help!
... View more
05-08-2023
04:40 PM
|
0
|
6
|
2501
|
|
POST
|
I believe so. It's something that I'm experimenting now. Having issue's with the arcpy.management CalculateField module though.
... View more
05-08-2023
03:56 PM
|
0
|
0
|
2711
|
|
POST
|
Thank you for replying Zach, I've gone with using the ObjectID, simplest easiest way to work this. I really appreciated the advice. However, I think I still have a use case. I have a survey for vendors to register vehicles, and some of these vendors have more than one vehicle. I'm looking for a way to show previous answers (ideally selectable) so that if the form gets filled out twice I don't end up with "Roses Roses" and "RosesRoses" for the same vendor. At the same time, if the vendor is new, and hasn't filled out the survey before, they still have the option to input their name. Kind of like how excel reviews value's in the column above and populates value's as you type. I have this worked out using two fields, but that leaves room for user error. Thanks, Matt
... View more
06-14-2022
03:12 PM
|
0
|
0
|
814
|
|
POST
|
Hi all, I have an application where I need users to input data sequentially every time a new unit is added to the system. Prepopulating answers doesn't work, because the user input number has to be a new unique value. So I'm just trying to make a list of old answers for review by the user to input the next value sequentially. I'm essentially looking to be able to use the search() or pulldata() function in a note. I was hoping that someone out there might know of a solution. Thanks, Matt
... View more
05-30-2022
08:09 AM
|
0
|
2
|
882
|
|
POST
|
Hi All, I'm trying to share an orthomosaic with my organization which is projected in our local NAD83 State Plane coordinate system, to use in a map to collect data in same coordinate system. So this forces me to use "Auto-Suggest" in tiling scheme when publishing the layer online. However, the highest level of detail possible for this is 18. Which just doesn't do my high resolution drone imagery justice. I was just wondering if anyone knew why there is this constraint, and if there's a way around it. Thanks! Matt
... View more
05-18-2022
04:59 PM
|
1
|
0
|
756
|
|
POST
|
I'm doing a viewshed study to be published online for sharing. My workflow is: Pull in DEM, Drop Points for Observers, Interpolate shape on observer points, Adjust Z (for the height of antenna, in field "OFFSETA") for observer points (this is so it looks better when published online), Run Viewshed (OFFSETA for antenna height). My question is: Does the viewshed use the z value in the point for the analysis. Am I accidentally using the offset height twice by adjusting z value and using OFFSETA in the analysis? Thanks, Matt
... View more
05-05-2022
02:42 PM
|
0
|
1
|
1207
|
|
POST
|
I too have been struggling with this for quite a while and have found a bit of a solution! (if you have access to ArcPro). I pull my feature layer out of the portal into ArcPro and put the Calculate Field into a Model scheduled to run periodically. Only downside I see to this is that the machine with the Scheduled Tool has to be on in order for this to work. As I understand it, ArcPro doesn't even have to be open. Hope this helps!
... View more
12-30-2021
04:58 PM
|
0
|
1
|
3945
|
|
IDEA
|
Title pretty much says it all. It seems that time settings default to edit date. I'd like to be able use other date fields for use in the time slider in WebMaps. My specific use case is using Velocity IoT to take a "Snap Shot", if you will, of the current features in a layer and assign a date to that "Snap Shot" to be visualized and sorted through based on the snap shot date field so that my end user can go back and see exactly what was happening and where on that specific date, not just what was edited on a specific date. *edit* it seems that this is already available in regular hosted feature layers, but not in layers produced through Velocity IoT
... View more
12-17-2020
10:05 AM
|
0
|
0
|
511
|
|
POST
|
Hey guys, Just hoping someone can answer this for me. I've got a dashboard with some Last Known Location layers. In the past I've been able to configure actions to "Follow Feature" in a list of LKL's, but this new Dashboard I've created does not have that option available in the list. Just wondering if anyone knows why or how to configure the layer to allow follow. (Above)No Follow Feature option (New list of LKL's in new Dashbaord) (Below)Has Follow Feature option (Old list in old dashboard) Thanks in advance!
... View more
12-16-2020
12:56 PM
|
0
|
1
|
915
|
|
POST
|
Hey there, I'm trying to get arcade to replace the value in one field when the value in another field is changed. I get no errors in my script, but am uncertain if arcade is capable of this type of action, collector is capable of this, or if I'm using the correct function. What I've got so far is as follows: iif($feature.Gun == 'nogun', Replace($feature.Mount, 'haspost', 'removepost'), Replace($feature.Mount, 'haspost', 'haspost') ); For a little bit of context here the 'gun' is referring to snowmaking equipment and 'post' is referring to a location that we can place snowmaking equipment. Locations are permanent. I have a view layer that only visualizes the "Gun" field which has a list of values: No Gun, 4 Step, 7 Step, Millennium. 'No gun' has no visualization. Other gun values have unique Icons. A second view layer visualizes the $feature.Mount whose list of values are: Mount, Has Post, Needs Post, Remove Post. If a gun is selected it will cover the mount visualization. So what I'm trying to accomplish here is that when our field technicians need to move a snowgun in the field they only have to change the drop down for $feature.gun to "No Gun" to change the visualization of $feature.mount to "Remove Post", and the visualization is changed automatically to convey information to the rest of the crew. Our guys use collector in the field. I realize that there will need to be more conditional statements to get the end product I described above (for instance 'No Gun', and 'Needs Post' are a combination I'll need to account for. I'd just like some input as to whether i'm barking up the wrong tree here or not. Thanks yall, I hope this was a clear enough explanation of my problem.
... View more
09-22-2020
05:09 PM
|
0
|
1
|
1218
|
|
POST
|
So this one is really driving me crazy because I think that there must be an easy solution out there. I have a point layer with 202 points in it. I need to add 2 fields that do not allow null values. But it seems that you cannot add non nullable fields to a layer that already contains data. I understand this is because all of the cells will be blank when the field is added, which is what we're trying to not allow. Is there a way to add a non nullable field with a default value set. My fields have a specific list of values and it makes it easier for my field workers if there is no option for null, as they get confused easily. Anyone know of a way to join two fields in a table that are already populated or some type of work around.
... View more
09-22-2020
10:23 AM
|
0
|
0
|
575
|
|
POST
|
Hi there, I've got a data set of underground utilities and I'm trying to total the length of groups of lines based on pipe size. For example, add all the lengths of lines where the field "Pipe Size" is equal to 12. I know I can export the data by the pipe size and get a sum of the length, but thats a little clunky. Thanks!
... View more
01-22-2020
01:00 PM
|
0
|
1
|
2380
|
|
POST
|
Found a workaround. Opened map in AGOL save as new map. Share with appropriate groups. Old map still stuck in offline, but atleast I didnt have to add all the layers to a new map and re format/ set permissions. Still a troublesome bug if anyone has a solution or esri can look into fixing in later versions
... View more
12-12-2019
05:29 PM
|
0
|
0
|
827
|
|
POST
|
Not really a question, more of bug reporting. I was experimenting with enabling offline use for a map that our organization has been using for a few months now. Not because we don't have service, but because what we do is very fast paced and even having to wait 30 seconds for everything to load is to long. Auto sync only syncs every 15 minutes (fast paced environment need instant updates) so does not work for our purposes. So I removed the offline area and disabled the option for offline for map in question. Here's where it gets weird. Now the map is stuck in offline maps (ipad) and I can no longer access it in any way through collector. If I re enable offline maps the download always fails . Disable use in collector and it disappears from the maps list, re enable and it reapers still in offline maps. Disable sync for one layer. Can't even see the option to enable offline use and it still only shows up in offline maps. Now here's the real fun part. Works fine on android. Unfortunately all of our field workers use Ipads. I know about the duplicate domain issue, have dealt with it in the past, and have not had the error since I fixed all of my layers weeks ago.
... View more
12-12-2019
05:09 PM
|
0
|
1
|
901
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-17-2023 02:01 PM | |
| 1 | 05-18-2022 04:59 PM | |
| 1 | 07-15-2024 12:55 PM | |
| 2 | 02-26-2024 04:24 PM | |
| 2 | 12-09-2019 02:07 PM |
| Online Status |
Offline
|
| Date Last Visited |
05-05-2025
03:20 PM
|