POST
|
Hello All, I seem to be having an issue with the control event volume node. I'm keeping a record of flow(gallons per minute) and would like to have 1 record per minute so I can calculate total volume for a period of time. I have a control event volume setup for 1 event per minute per location. However, Looking at the data stored I am getting 2,3 and sometimes 4 records per minute. Just curious if anyone else has seen this issue, if this is a known problem, or if there's a work around. Thanks!
... View more
10-31-2024
03:41 PM
|
0
|
1
|
151
|
IDEA
|
@Wei_Ying Would you happen to know when this next release is coming? Just trying to plan if I should make a dashboard or use ExB.
... View more
10-06-2024
03:25 PM
|
0
|
0
|
316
|
IDEA
|
@AlderMaps @AlixVezina I have auto refresh turned on and have the refresh rate set in my maps, but I'm not seeing my Chart widget (using the guage chart) refreshing. Using the same data source in a list, however, I am seeing auto refresh. Does this function not work for charts?
... View more
10-03-2024
03:12 PM
|
0
|
0
|
348
|
POST
|
Hello Fellow Velocity users, I have a feed that I'm trying to ingest from a vendor that uses the IS80601 date format: "yyyy-MM-ddTHH:mm:ss.fffZ". example: "2024-07-10T20:34:55.2724781+00:00" I haven't been able to get velocity to recognize this as a date field. According to this article I figured I could just replace the 'f' with 'S' and it would work, but no luck. I think I'll end up using the Split function to remove everything after the period, convert to a date and manually adjust for time zone. I just figured I'd see if anyone out there in the GISphere had any suggestions. Cheers, Matt PS. Although not necessarily the solution I was looking for... I tested the Split and Date function and it... works. var SplitTime = Split($feature.lastComms, ".") return Date(SplitTime[0]) Returns: Jul 10, 2024, 8:34:55 PM Mountain Daylight Time in the field calculator. returns Unix time in sample or compare node. Map viewer seems to be converting unix successfully to a human readable format.
... View more
07-15-2024
12:55 PM
|
1
|
1
|
330
|
POST
|
Hello all, I'm attempting to automatically compile an array of domain codes for comparison when deciding how to visualize a layer. So this is what I've got so far: var codearray = Array(1)
var domain = Domain($feature, "Status")
var index = 0
var codedValues = domain.codedValues[index].code
for(var att in codedValues){
Insert(codearray, 0, codedValues)
index + 1
}
return codearray
Results: array(4)
0: null
1: "Run"
2: "Run"
3: "Run" Input Data (results of Domain function) dictionary
codedValues: array(2)
0: dictionary
code: "Run"
name: "Run"
1: dictionary
code: "Standby"
name: "Standby"
dataType: "esriFieldTypeString"
name: "HydrantLoc_111319_Status_f1dd7c78-d63c-4b23-8d0d-a5f5c916c584"
type: "codedValue" The Results I'm looking for: array(2)
0: "Run"
1: "Standby" Then to take this a step further I'm looking to do this for multiple fields and then combine them into another array that contains every combination of value from each array. But maybe that's a problem for a different post. Thanks In Advance Yall!
... View more
02-26-2024
04:24 PM
|
2
|
2
|
752
|
POST
|
I have been able to get this to work in notebooks. It runs faster than in a model builder. And you have access to more Python modules.
... View more
06-05-2023
11:13 AM
|
0
|
0
|
1524
|
POST
|
Just in case anyone else is looking for a similar solution, After working with tech support we discovered that in the AGOL notebook, you had to use arcpy.SignInToPortal("https://arcgis.com", "<username>", "<password>") to get access to arcpy modules and functions. Using my organizations portal address did not work, but arcgis.com did.
... View more
06-01-2023
10:53 AM
|
0
|
0
|
917
|
POST
|
Hi all, I'm just wondering if anyone has had any experience in Projecting Vertical from elipsoidal(or anything else) to Geoid18? I know vertical transformations are relatively new to ArcPro. I've downloaded the GEOCON pack from esri, but have no idea which file is supposed to reference Geoid18. If there even is one. TIA! Matt
... View more
05-17-2023
02:01 PM
|
1
|
0
|
389
|
POST
|
Thank you for the response. However I'm using a test layer and none of the restrictions apply to my layer. And the script is working fine in ArcPro. I think it's something to do with setting the environment, but in Pro I'm just pulling the layer directly from AGOL and haven't set the environment either.
... View more
05-16-2023
11:39 AM
|
0
|
0
|
944
|
POST
|
Hi everyone, I'm trying to take some models in ArcPro that I've built, and translate them into a AGOL Advanced notebook. (It'd be a lot easier to just leave this in models, but IT issues cause periodic disconnect from portal mid processes and it corrupts the data) Originally I was building the notebook in pro for testing. However I just tried it in the online environment and am not having any success. Here's the code (works in an ArcPro Notebook.) from arcgis.gis import GIS
gis = GIS("home")
import arcpy
line_url = ("https://services8.arcgis.com/kiN57DOJrIhpvBby/arcgis/rest/services/<LineLayer>/FeatureServer/98")
table_url = ("https://services8.arcgis.com/kiN57DOJrIhpvBby/arcgis/rest/services/<TableForJoin>/FeatureServer/0")
arcpy.management.DeleteField(in_table=line_url, drop_field=["Freight", "Price_Per_Foot", "Price_Per_Unit", "Type", "Description" ])[0]
arcpy.management.JoinField(
in_data=line_url,
in_field="Lock",
join_table=table_url,
join_field="Key_",
fields="Description;Price_Per_Foot;Price_Per_Unit;Freight",
fm_option="NOT_USE_FM",
field_mapping=None
) And the error (returned in AGOL Notebook, no errors in pro): ExecuteError Traceback (most recent call last)
Input In [110], in <cell line: 2>()
1 #Drop Fields
----> 2 arcpy.management.DeleteField(
3 in_table=line_url,
4 drop_field="Lock;Description;Price_Per_Foot;Price_Per_Unit;Freight",
5 method="DELETE_FIELDS"
6 )
8 arcpy.management.JoinField(
9 in_data=line_url,
10 in_field="Lock",
(...)
15 field_mapping=None
16 )
File /opt/conda/lib/python3.9/site-packages/arcpy/management.py:6025, in DeleteField(in_table, drop_field, method)
6023 return retval
6024 except Exception as e:
-> 6025 raise e
File /opt/conda/lib/python3.9/site-packages/arcpy/management.py:6022, in DeleteField(in_table, drop_field, method)
6020 from arcpy.arcobjects.arcobjectconversion import convertArcObjectToPythonObject
6021 try:
-> 6022 retval = convertArcObjectToPythonObject(gp.DeleteField_management(*gp_fixargs((in_table, drop_field, method), True)))
6023 return retval
6024 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)
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Table: Dataset https://services8.arcgis.com/kiN57DOJrIhpvBby/arcgis/rest/services/<LineLayer>/FeatureServer/98 does not exist or is not supported
Failed to execute (DeleteField). So my end goal here is to have a table hosted in AGOL that when updated, will update prices in hosted Feature Layers. Then on to field calculates to get price of line based on (feet*price per foot). I'm deleting fields before joining because if I don't delete, the join just continually adds more sequential fields that do not fit in with the field calculation done later in the script (at least that's how it worked in model builder). I've also tried gis.content.get, and converting to the FeatureLayer module in this script, and get a different error: RuntimeError Traceback (most recent call last)
Input In [111], in <cell line: 2>()
1 #arcpy.management.DeleteField(in_table=lineFeature, drop_field=["Freight", "Price_Per_Foot", "Price_Per_Unit", "Type", "Description"])[0]
----> 2 arcpy.management.DeleteField(
3 in_table=FuturePipe,
4 drop_field="Lock;Description;Price_Per_Foot;Price_Per_Unit;Freight",
5 method="DELETE_FIELDS"
6 )
8 arcpy.management.JoinField(
9 in_data=lineFeature,
10 in_field="Lock",
(...)
15 field_mapping=None
16 )
File /opt/conda/lib/python3.9/site-packages/arcpy/management.py:6025, in DeleteField(in_table, drop_field, method)
6023 return retval
6024 except Exception as e:
-> 6025 raise e
File /opt/conda/lib/python3.9/site-packages/arcpy/management.py:6022, in DeleteField(in_table, drop_field, method)
6020 from arcpy.arcobjects.arcobjectconversion import convertArcObjectToPythonObject
6021 try:
-> 6022 retval = convertArcObjectToPythonObject(gp.DeleteField_management(*gp_fixargs((in_table, drop_field, method), True)))
6023 return retval
6024 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 If anyone knows of a better way to do this or how to get the delete then join function working correctly, I very much appreciate the help. Cheers, Matt
... View more
05-15-2023
04:33 PM
|
0
|
3
|
997
|
POST
|
So thanks to your advice, I was able to get arcpy to work. However, due to the advice given here, I've been trying to get the FeatureLayer.calculate to work and it gets stuck on the where="sql expression". I've tried a few different expressions (1 = 1, OBJECTID > 1, OBJECTID >= 1, Length > 1, etc) and everything returns the same error. It's not a very big data set. Only 179 rows. See: Code: FuturePipe.calculate(where="1 = 1",
calc_expression={"field": "Key", "value": "str(Value1) + ' ' + str(Value2)" } ) Error: ---------------------------------------------------------------------------
Exception Traceback (most recent call last)
In [88]:
Line 1: FuturePipe.calculate(where="1 = 1",
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\layer.py, in calculate:
Line 3556: return self._con.post(
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py, in post:
Line 1528: return self._handle_response(
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py, in _handle_response:
Line 1008: self._handle_json_error(data["error"], errorcode)
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py, in _handle_json_error:
Line 1031: raise Exception(errormessage)
Exception:
'Invalid sql expression.' parameter is invalid
(Error Code: 400) TIA! PS. Just for fun (and to not bother you guys) I asked ChatGPT and it said that the where expression should be valid.
... View more
05-09-2023
04:06 PM
|
0
|
1
|
1140
|
POST
|
Thank you for the feedback! I hope you can geolocate your retirement soon!
... View more
05-09-2023
07:02 AM
|
0
|
0
|
1159
|
POST
|
Thank you for the help! It's very much appreciated.
... View more
05-09-2023
07:02 AM
|
0
|
0
|
1161
|
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 |
11-04-2024
10:41 PM
|