|
IDEA
|
@KoryKramer Thanks! I didn't know about ArcGIS Pro’s ArcMon tool. That will be useful. I wonder if what we need is the Console Messages window...but visible right in ArcGIS Pro as a side-pane window. Or something like that. So we could see the console() messages as we test. Reasons: Console() messages don't seem to show up in the ArcMon tool. Even with the Debug checkbox enabled. Would be convenient to see a simple window -- specifically showing console() messages. But I'm a novice, so I'm open to input. Others might have better ideas? @KimberlyGarbade @jcarlson @JohannesLindner
... View more
03-04-2022
11:39 PM
|
0
|
0
|
2431
|
|
IDEA
|
Could Esri consider supporting the JavaScript (for...of) statement in Arcade? for (var path of paths) { for (var point of path) { JavaScript For Of Currently, only the (for...in) statement is supported: Arcade - For loops Arcade: for (var path of paths)
... View more
03-04-2022
10:34 PM
|
0
|
3
|
612
|
|
IDEA
|
Could Esri consider supporting the JavaScript CONST and LET keywords in Arcade? The benefits of those keywords are outlined here: JavaScript Const JavaScript Let Example use case: Code Review Stack Exchange: Modify polyline vertices
... View more
03-04-2022
10:20 PM
|
1
|
0
|
495
|
|
IDEA
|
Related: A comment in DB Triggers vs. Calculation Attribute Rules Use IDE for writing Arcade expressions
... View more
03-04-2022
09:53 PM
|
0
|
0
|
8007
|
|
POST
|
One thing to add to list: I've learned that a significant con to attribute rules is: We can't develop scripts in a proper IDE -- and test them right there in the IDE. I've installed VS Code so that I can lint scripts -- using the JavaScript linter. And I've installed node.js so that I can run the scripts. But that's just barely useful, because there are quite a few differences between Arcade and node.js scripts. So I have to make lots of modifications to my Arcade to get it to run as node.JS. So it ends up being pretty horrible jumping back and forth between ArcGIS Pro and VS Code. Whereas we don't have that problem with SQL Triggers. We can develop in a IDE like Oracle SQL Developer, Toad, etc...and it all works as expected. That's not a total deal breaker. Lots of people use calculation attribute rules successfully -- even without an IDE. I just thought I'd add it to the list, since it's something that's causing me trouble at the moment.
... View more
03-04-2022
09:46 PM
|
0
|
0
|
7998
|
|
IDEA
|
Could Esri consider adding a segmentAlongLine() function to Arcade? segmentAlongLine (start_measure, end_measure, {use_percentage}) Returns a Polyline between start and end measures. That would be quite helpful. Otherwise, it takes a few pages of code to do that in Arcade.
... View more
03-04-2022
08:52 PM
|
4
|
0
|
427
|
|
IDEA
|
Idea: (edited using input from @jcarlson) The diagnostic logs in ArcMon are great, but it seems like an unnecessarily complicated way to view something that, in other contexts, is simply another window or tab in the expression builder. A simple window would be awesome. And maybe not just an "Arcade Console" window, but a tabbed "Logs" window. The different categories of logs appear as tabs as needed. Maybe we could get a logs tab that captures Arcade Console() messages as well as messages from Python and GeoProcessing. As it stands, if I'm looking for feedback on the things I'm doing in Pro, there are a number of disparate tabs / panels / popup windows to look for to see these. Old idea: When developing and testing attribute rules: Would it be possible to view log info when the rule gets executed? https://i.stack.imgur.com/KmGZP.png
... View more
03-04-2022
03:17 PM
|
1
|
6
|
2464
|
|
IDEA
|
Could Arcade or JS linting be added to the Expression section in the Expression builder?
... View more
03-04-2022
02:59 PM
|
1
|
0
|
581
|
|
IDEA
|
In the Attribute Rule pane: Could a button be added that would let us view the code in a full-screen window?
... View more
03-04-2022
02:51 PM
|
0
|
1
|
780
|
|
IDEA
|
In the Expression Builder window: It would help if we could vertically resize sections — so that the Expression section could be made bigger. Edit: It's handy that we can double-click the "Expression Builder" title to maximize the entire window. In addition to that, we want to make the Expression section bigger so that we can see more of our Arcade code. Thanks!
... View more
03-04-2022
02:36 PM
|
5
|
9
|
2515
|
|
IDEA
|
Related: Compare pre-edit geometry with edited geometry
... View more
03-04-2022
01:38 PM
|
0
|
0
|
6729
|
|
POST
|
Esri has a calculation attribute rule expression on GitHub called Set Ms to Index. The script loops through polyline vertices and updates the M-Values. var current_line_geo = Geometry($feature);
var line_geo = Dictionary(Text(current_line_geo));
var paths = line_geo['paths'];
for (var path_idx in paths){
for (var vert_idx in paths[path_idx]){ That script works, but I'm having trouble understanding all the prep work that's involved -- for converting the feature's geometry into an array: Feature —> Geometry —> Text —> Dictionary (type) —> Paths array (array is a key/value pair within dict) That seems like a lot of overhead just to get at the vertices. Would someone be able to explain why all of those steps are needed — or if it can be simplified? Thanks!
... View more
03-04-2022
01:35 PM
|
1
|
7
|
4901
|
|
POST
|
I'm attempting to use the JS from this post — in an Arcade calculation attribute rule: Code Review: Modify Polyline Vertices That script uses the following for loop: //This script works as standalone JS: https://jsfiddle.net/x4su7tna/ var paths = [[[0,5,null],[10,10, null],[30,0, null],[50,10, null],[60,10, null]]] for (var path of paths) { return } ERROR 002717: Invalid Arcade expression, Arcade error: Syntax error in for loop, Script line: 32760 I get that error when I try to save the attribute rule. I think the for loop is the culprit: for (var path of paths) { If I replace that for loop with for (var path_idx in paths) { , then I can successfully save: var paths = [[[0,5,null],[10,10, null],[30,0, null],[50,10, null],[60,10, null]]] for (var path_idx in paths) { return } Question: Why do I get an error when I use for (var path of paths) { ?
... View more
03-04-2022
08:18 AM
|
0
|
1
|
1002
|
|
POST
|
Yes! That worked! I used the folder option you mentioned. Thanks! Related: Idea: Arcade Extension for Visual Studio Code
... View more
03-03-2022
07:03 PM
|
0
|
0
|
3204
|
|
POST
|
When writing Arcade scripts, I think it would be helpful to do testing in an IDE beforehand, if the script doesn't use any Arcade-specific functions (or if it does, temporarily remove/fake out those parts). For example, define a polyline array manually... var paths = [[[0,5,null],[10,10, null],[30,0, null],[50,10, null],[60,10, null]]] ...loop through the vertices, do some stuff, and output results as text. So, I want to use VS code to do that testing...by running the Arcade expression as if it were JavaScript . I know Arcade isn't the same thing as JS, but I think it's close enough for the testing I want to do. Question: Has anyone had any success running basic JS scripts in VS Code? That might be a dumb question, but I really have no idea where to start. Unlike Python, it doesn't seem like you can just type some JS like console.log('Hello World'); and then run the code to output some text. I tried searching the web and I got a bunch of results about node.js -- which I have installed. Unfortunately, I still can't figure out how run a basic script, such as print "Hello World". Would someone be able to point me in the right direction? Thanks.
... View more
03-03-2022
10:29 AM
|
0
|
3
|
3237
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-30-2026 11:08 AM | |
| 1 | 05-11-2026 11:23 AM | |
| 2 | 05-07-2026 04:19 AM | |
| 1 | 05-06-2026 09:03 AM | |
| 1 | 03-19-2026 09:29 AM |