|
POST
|
Oh yes. Funny, I would have eventually realized this after digging through all of my own code, because I actually already use fetch() in all cases for retrieving HTML elements and JSON objects. Apparently, I wasn't actually relying on the "appHtml" path in my dojo loader file for some time. In case anyone else comes across this discussion, here's what I mean. You have a separate HTML file in your project (in this case under the /html folder) that you want to leverage for constructing a custom interface. fetch('html/redlineAttributes.html')
.then(function (response) {
return response.text();
})
.then(function (htmlRedlineAttributes) {
createRedlineAttributesfDialog(htmlRedlineAttributes);
}); A function to create the dialog, while querying HTML elements by ID or class name... function createRedlineAttributesfDialog(htmlRedlineAttributes) {
const parser = new DOMParser();
const renderedHtml = parser.parseFromString(htmlRedlineAttributes, 'text/html').documentElement;
const redlineAttributesDialogAttachNode = document.getElementById("redlineAttributesDialogAttachNode");
const redlineAttributesDialogContainer = document.getElementById("redlineAttributesDialogContainer");
const dialogRedlineAttributes = renderedHtml.querySelector(".dialogRedlineAttributes");
....etc. In my case I display the dialog in a separate function. this.showRedlineAttributesDialog = function (curGraphic) {
appAttributes.graphicID = curGraphic.graphicPairID;
const redlineAttributesDialogContainer = document.getElementById("redlineAttributesDialogContainer");
const redlineAttributesDialogAttachNode = document.getElementById("redlineAttributesDialogAttachNode");
redlineAttributesDialogContainer.style.visibility = "hidden";
redlineAttributesDialogContainer.style.display = "block";
if (redlineAttributesDialogAttachNode.offsetHeight) {
redlineAttributesDialogAttachNode.style.top = "5px";
}
... View more
Wednesday
|
1
|
0
|
102
|
|
POST
|
Thanks, Joel. After talking to my colleagues and reading your post I realized it's probably going to work out once I get moving into ESM. I was mixing a few things together in my mind. If I can do something like this below to replace AMD then I should be fine. import appPrintPDF from "./js/printPDF";
appPrintPDF.initialize();
import identifyPopupHTML from './html/identifypopup.html'; The website you provided will be a helpful reference, too.
... View more
Wednesday
|
0
|
2
|
110
|
|
POST
|
I have a large web application used by most of our department that I've been maintaining since the early versions of the ArcGIS API / Maps SDK for JavaScript. Along with looking into the Widget to Component transition, there is one really important concept for which I need clarification and guidance. Will my dojoConfig.js file (entire code pasted below) continue to work after 4.x? (I'm currently on 4.27...you guys move too fast for some of us!) I realize Dojo framework itself has long been removed, but this piece continues to work and appears to be supported through the last 4.x version (4.34). As I understand, it’s basically a Require.js remnant that I still need to use for defining custom paths in the AMD structure in order to break up large amounts of code and for having separate classes and HTML templates. Either it will become unsupported altogether in 5.x (immediately or within a few versions) or maybe there no good way to weave this into Web Components…in either case it would leave me scrambling to find a way to reference all my files in the Visual Studio (.NET Framework) project. I asked the Community about this a couple of years ago but never got a good answer. This will take a substantial amount of time for me to re-write, when converting to Components alone, so I don't want to waste any time with my approach over the next 6 months. Do I need to re-arrange my code altogether, and if so how best to accomplish in today's modern JS design (preferably without relying on React/Angular/Vue frameworks)? I don't have much time to research these things, having just finished overseeing a double UN deployment and loaded with many other projects. I'm only knowledgeable in so many directions. dojoConfig.js let locationPath = location.pathname.replace(/\/[^/]+$/, '');
window.dojoConfig = {
async: true, parseOnLoad: false, packages: [
{ name: "appJavascript", location: locationPath + "/js" },
{ name: "appJavascriptClasses", location: locationPath + "/js/classes" },
{ name: "appJavascriptChartJS", location: locationPath + "/js/chart_js" },
{ name: "appHtml", location: locationPath + "/html" }
],
has: {
"esri-native-promise": true
}
} This is used to call Javascript files from the "appJavascript/..." path define(["esri/config", "esri/geometry/SpatialReference", "esri/geometry/Extent", "esri/Map", "esri/views/MapView",
"appJavascript/buttonHandlers", "appJavascript/layersLegend", "appJavascript/measure", "appJavascript/redline",
], function (esriConfig, SpatialReference, Extent, Map, MapView,
appButtonHandlers, appLayersLegend, appMeasure, appRedline
) { Here's a portion of my file structure to get an idea of the size: Here's what else I know: 4.25 release notes saying that Dojo Loader is still included in the CDN AMD npm package and esri-loader are deprecated at 4.29 It seems like only a short matter of time before Dojo Loader is obsolete.
... View more
|
2
|
4
|
196
|
|
POST
|
Ah yes, so simple. Using "Connected" for the type, I then refined my barrier conditions and for output specified I only want certain valve asset groups / types. The final selection was only a set of valves and nothing else. Seems like this accomplishes the goal. Thanks!
... View more
2 weeks ago
|
0
|
0
|
166
|
|
POST
|
Thanks Patrick (and Mike). You both are of course right in the overall sense. I cannot argue with what you're saying and how isolating works in this case. I seem to have forgotten "isolation" traces are about the network as a whole (from sources outward to dead-ends, essentially). In real life, though, I'm assuming our Field Operations staff would want to turn off this cul-de-sac valve along with the others for fully isolating the pipe segment(s) involved, but that's an internal question I have for engineering and operations management.
... View more
2 weeks ago
|
0
|
0
|
167
|
|
POST
|
It selects the valve when Include Isolated Features is checked. So it's going right past this device feature. It's just odd, because this is one of over 21,000 valves with Asset Group = System, Asset Type = System. I didn't edit this feature. It's showing as having a last modified date the same as nearly every other valve which is the day we migrated over last month. That's why it has me nervous. If this seemingly random one is overlooked, then why are the others getting selected when spot checking so far.
... View more
2 weeks ago
|
0
|
2
|
203
|
|
POST
|
My problem: After recently deploying our water UN, and having already walked through an isolation trace to make sure it works (including tracing/updating the full System tier), I went to a random area to walk through trace settings. Although 3 System valves were selected in a typical isolation trace, I discovered one valve was missed in the trace. It's not easily explainable. I've checked z-values (all valves are set to 0), made sure it's selected using a "CONNECTED" trace (which it is), and checked attributes. There is nothing that stands out as to why isolation tracing won't see this as a barrier. I've tried these two settings for Filter Barriers, but neither makes any difference Category Is equal to Specific Value Isolating Asset group Is equal to Specific Value 2 (under network properties, I checked that System valve / System has "Isolating" under "Category" column) To be clear, the yellow highlighted valve is what I've selected in the map. It's a System / System valve, not a System / Bypass valve (similar yellow in legend). It's yellow because I highlighted it. All 4 valves are identical in terms of attributes that matter for UN connectivity and tracing. There is nothing special about this one valve, it's like many others. The lines on either side show z-values of 0 as well. I cannot find anything unusual about this random little area. It has me concerned we cannot trust the tracing results if I happened to notice this, which otherwise I would have trusted is going to produce accurate results.
... View more
2 weeks ago
|
0
|
7
|
244
|
|
POST
|
Nevermind, I realized the output was too large for my target field. This solved it: Left(GdbVersion($feature), 16) How do I delete a post in Esri Community? Under Post Options for my reply I only see Edit Reply but not a Delete option.
... View more
08-15-2025
08:13 AM
|
0
|
0
|
245
|
|
POST
|
The GdbVersion doesn't seem to work with a text field. I'm using ArcGIS Pro 3.3.3 The "G" is uppercase compared to the video tutorial: GdbVersion($feature) In any case, I've tried all case combinations. With only 2 lines of code, I cannot get it working. var CurVersion = GdbVersion($feature) return CurVersion Result of above on field calculate (for a simple text field of 16 characters) for a versioned layer in a Utility Network: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds. Message: Unable to complete operation. Details: Unable to perform applyEdits operation. Error: Invalid column value [UT_GISID]. Failed to execute (CalculateField). Is there a bug with 3.3.3 or is the documentation wrong? https://developers.arcgis.com/arcade/function-reference/feature_functions/#gdbversion
... View more
08-15-2025
08:02 AM
|
0
|
1
|
250
|
|
POST
|
An even better solution that pretty much mimics what was being done in the Geometric Network: 1. Select water main to be realigned. Instead of deleting all vertices between start/end nodes, use "Replace Geometry" on the water main (instead of on all the service lines attached to it). Make sure the start vs end node is in the correct order as you re-draw the line, so things don't get flipped. 2) When you finish your sketch edits, it'll shift the main and all the junctions and service lines automatically come over with the main. 3) Now all you have to do, if needing to shorten or increase the length of the service lines is touch the end node (vertex) rather than editing both ends in the previous steps.
... View more
08-06-2025
02:40 PM
|
0
|
0
|
347
|
|
POST
|
Thanks. Unfortunately, using grid snapping won't actually save time/clicks. Moving individual service line features (by dragging junction points), without referencing the snapping grid, was already one option we considered, but the reason it's more efficient to delete all vertices in between the end points is because ultimately the Technicians will still be re-drawing the geometry of each service line. They might get shortened, along with snapping to the realigned main geometry. So the most efficient route for our situation seems to be: 1. Realign start/end nodes for water main. 2. Mass delete all intermediate vertices. The main feature is shifted and all service lines are then disconnected. 3. For each service line, use "Replace Geometry" to redraw the service line at a more realistic length. While doing this part I realized we can use the [right click] Snap to Feature -> Edge option to snap to the water main midspan. I guess it's because we're shortening service lines while also repositioning them with the realigned main that we are in a somewhat rare situation. In any case, we do see that the Geometric Network handled this one with less clicks, since it auto carried the service lines over with the re-aligned main feature and kept them snapped. Oh well, we'll adapt.
... View more
08-05-2025
12:01 PM
|
0
|
1
|
370
|
|
POST
|
Is there any way to configure a utility network so that it behaves like the geometric network when adjusting line vertices as explained below? In the GN, if you were to delete all the vertices between start/end nodes, when you finish editing the water main it would carry all the service lines over as still snapped to the main. It would create vertices along the main at those fitting/service line connections. In the UN, it doesn't behave the same way. I tried setting edge connectivity to "Any vertex" for Water Main / Distribution Main asset type, but that doesn't fix the problem because it's precisely when the vertices are removed as the water main feature gets realigned. After deleting this vertex (under the X) and finishing the sketch, it doesn't pull the service line and junction over with it. Our GIS Technicians have to use 2 steps to re-draw the service line graphic: move junction point and then use "Replace Geometry" tool. Using "Replace Geometry" tool alone won't allow you to snap an end vertex anywhere along the water main feature. It may seem like a minor issue, but when you're doing this all day endlessly, with two clicks instead of one, it adds up to much time wasted.
... View more
08-04-2025
08:13 AM
|
0
|
3
|
454
|
|
POST
|
@gis_KIWI4, thank you so much for this simple point about needing to traverse the entire network! I only wish I had focused on it sooner. @MichaelParma, I also owe you thanks, since you sort of wrote the same thing. It was the words above, "needs to traverse the network before", that stuck with me, though. I've finally realized that on the Water System tier I hadn't established a subnetwork controller, since we didn't carry in a point for treatment plants or bulk meter. Using a FGDB copy, I've managed to get things working by... 1) Creating a Transmission Main that connects to a new point of Supply / Treatment Plant. 2) Defining the treatment plant as a subnetwork controller (port 2). 3) Tracing the entire system (Tier = Water System) using a Connected Trace. 4) Running an Isolation Trace using a random starting point, with Tier = Water System and for Filter Barriers I used Category = Isolating. It successfully stopped on the first set of valves going outward from the starting point. Woohoo!
... View more
07-15-2025
12:31 PM
|
0
|
0
|
92
|
|
POST
|
I've used something very close to what's shown in the article you mentioned. No matter what I try, it always fails with "No valid subnetwork controllers found." I'm using Water Pressure tier. I don't have P:Device Status (intentionally removed, using D_Configurations), but my Condition Barriers should be fine with Lifecycle Status check of does not include "In Service and To Be Retired". Filter Barrier is Category = Isolating. Somehow the 3 water storage tower subnetwork controllers aren't recognized with Isolation traces, but they work fine when running subnetwork traces to update my 3 pressure planes. Hmm. Would Esri Tech Support be my best chance for troubleshooting at this point? I'm concerned if nobody here has a good suggestion and this hasn't ever been observed. Is my UN "corrupted" somehow? I used D_Configurations to properly remove certain fields/subtypes/properties, but nothing crazy. Update: I noticed my subnetworks aren't showing under Find Subnetworks pane, so I'm going to first rebuild the topology and then run Update Subnetworks to make sure they're listed (and not dirty), and then I'll re-try the isolation trace. Maybe that was my problem all along? Controllers aren't detected because subnetwork wasn't fully built. This is a new round of creating UNs, so I must have forgot to complete this step. Hopefully that's it. More to come...
... View more
07-01-2025
10:14 AM
|
1
|
1
|
635
|
|
POST
|
Hi Michael, I have three WaterDevice points that are Storage / Tower features with Is Subnetwork Controller = True. These are for the Pressure tier and the pressure subnetworks have been tracing fine. This was the first thing I confirmed. As for isolation tracing, nothing has resolved it yet. I figured maybe I'll focus on trying to make it work with Water Pressure rather than Water Isolation tier, as you point out. I know Pressure traces with Trace Type = Subnetwork. I guess if the trace type is isolation then the problem is about the subnetwork controller for isolation. I don't understand how to use Isolation Zone, it seems. I'll move on to gis_KIWI4's thoughts next, unless you have other ideas? Thanks.
... View more
06-30-2025
03:00 PM
|
0
|
1
|
669
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Wednesday | |
| 2 | Monday | |
| 1 | 07-01-2025 10:14 AM | |
| 1 | 04-16-2025 09:49 AM | |
| 1 | 11-17-2020 03:34 PM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|