|
POST
|
Thanks! The feature class was in a different database, so that seems to have been the issue. Is there a way to reference a dataset in a different database? Or does everything have to be in the same one for things to work??
... View more
03-20-2023
12:37 PM
|
0
|
1
|
1922
|
|
POST
|
Hi, Can anyone see what the problem might be with this line of code. I've only just started messing with Arcade, but to me everything seems to be ok, it's just not recognizing the feature set name for some reason.
... View more
03-20-2023
12:24 PM
|
0
|
3
|
1938
|
|
POST
|
OK, so here is my version of a StreetView tool. This was compiled for Pro 2.9, so it will not work in 3.x. I only have access to 3.0 and one of the libraries I use is not compatible, so I will have to wait till I have access to 3.1 before I can post an update. AddIn and code available here: https://github.com/bbulla24/ArcProStreetviewTool
... View more
03-20-2023
10:09 AM
|
1
|
0
|
3915
|
|
POST
|
OK, I'll work on cleaning up the code I created an post a version onto GitHub. Similar, but using DockPanes.
... View more
03-16-2023
10:04 AM
|
0
|
1
|
3950
|
|
POST
|
Yes, once you "Build" the project that will create a new .esriAddInX file.
... View more
03-16-2023
05:16 AM
|
0
|
0
|
4125
|
|
POST
|
Hi Charles, Thanks, I will give that a go, but do you know if there is something specific to 3.0 that might be the issue? This exact same code has been working in 2.8 for years. I use this same looping/EditOperation strategy in many of my tools I've created for 2.8 and never had any issues. This is the first tool I am converting to 3.0 and I'm only now seeing issues. I haven't seen anything online about EditOperation working differently in 3.0.
... View more
02-27-2023
01:56 PM
|
0
|
0
|
2177
|
|
POST
|
Hi, So the following code works in 2.8. Basically it works with the selected features, performs some calculations, and then updates a field on each selected feature. For some reason in 3.0, only one of the selected feature s gets updated. It goes like this: //Create an Inspector to edit the selected features
var insp = new ArcGIS.Desktop.Editing.Attributes.Inspector();
//Loop through each selected OID
foreach (var oid in selectedOIDs)
{
insp.Load(gravitySewerLayer, oid);
fromMHElevation = 0;
toMHElevation = 0;
//Check if the feature has NULL for either invert. If so, skip and go to next.
if ((insp["UPSTREAMINVERT"].Equals(System.DBNull.Value)) || (insp["DOWNSTREAMINVERT"].Equals(System.DBNull.Value)))
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(insp["FACILITYID"].ToString() + " is missing required invert information.", "Error");
}
else
{
//Get the To and From point of the currently selected feature
var pointCollection = ((Multipart)insp.Shape).Points;
MapPoint fromPoint = pointCollection[0];
MapPoint toPoint = pointCollection[pointCollection.Count - 1];
//check to make sure the mahole ELEVATION has a value before proceeding
if ((GetIntersectingFeature(fromPoint, sanManholeLayer, "ELEVATION") == null) || (GetIntersectingFeature(toPoint, sanManholeLayer, "ELEVATION") == null))
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(insp["FACILITYID"] + " has no intersecting TO/FROM Manhole, or the TO/FROM Manhole has a NULL 'ELEVATION' value.", "No Manhole data found");
}
else
{
//Find the ELEVATION of both manholes that intersects the ends of the gravity main
double fromMHELevation = Convert.ToDouble(GetIntersectingFeature(fromPoint, sanManholeLayer, "ELEVATION"));
double toMHELevation = Convert.ToDouble(GetIntersectingFeature(toPoint, sanManholeLayer, "ELEVATION"));
avgDepth = ((toMHELevation + fromMHELevation) / 2) - ((Convert.ToDouble(insp["UPSTREAMINVERT"].ToString()) + Convert.ToDouble(insp["DOWNSTREAMINVERT"].ToString())) / 2);
insp["EST_AVG_DEPTH"] = avgDepth;
editOperation.Modify(insp);
updatedFeatures++;
}
}
}
if (editOperation.Execute() == true)
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(updatedFeatures.ToString() + " features updated.", "Sani. Avg. Depth Tool - Update Complete");
else
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(editOperation.ErrorMessage.ToString() + "\n" + "\n" + "Please try again using the current selection. If the problem persists, let Brian know.", "Sani. Avg. Depth Tool - ERROR"); Any ideas what might be going wrong? I have gone through all the "Migrate to Pro" steps, so I do not think that is an issue. The project compiles fine and will run in debug mode with no errors. It's just that the Edit Operation only seems to be editing the final selected feature that is processes.
... View more
02-27-2023
11:38 AM
|
0
|
8
|
2214
|
|
POST
|
OK, this seems to be working now using the Microsoft.Data.SqlClient NuGet. Not sure why it's working today but not yesterday. I've installed/uninstalled several times and now it's working?? Dunno....but it's working with no code changes.....just the NuGet and a new "using" statement.
... View more
02-16-2023
01:06 PM
|
1
|
0
|
8572
|
|
POST
|
Hi, I am running into this same problem in a project that I am converting from Pro 2.x to Pro 3. I originally added the NuGet package for Microsoft.Data.SqlClient, but that didn't help at all, and once I added the NuGet fro System.Data.SqlClient that at least removed all the Build errors and I could run the code in debug mode. But....once I get to the following line of code, I get the "not supported on this platform" error. Any ideas??
... View more
02-15-2023
11:58 AM
|
0
|
0
|
8591
|
|
POST
|
Thanks Johannes! So does ArcMap not enforce the Split Policy? We are only seeing this behaviour happen in ArcGIS Pro.
... View more
01-30-2023
05:59 AM
|
0
|
1
|
1045
|
|
POST
|
Hi, We are noticing that when we select a line feature and then use the Split tool from the standard editing tools, that a specific attribute is getting set to <Null>. Has anyone ever experienced this? Any explanation as to what might be causing this?? It's just one specific attribute in both halves of the split line feature. Thanks,
... View more
01-30-2023
05:30 AM
|
0
|
3
|
1063
|
|
POST
|
Hi, Yes, I have tried what you are proposing but perhaps this is a unique situation. The inspection "table" I am talking about is getting updated all the time, so a feature that doesn't show up as inspected today, might actually have an inspection in it the next time around. I plan on publishing this as a webservice so it needs to be able to by dynamic and just work everytime without manually updating it constantly. There must be a way to use a "NULL" and "IS NOT NULL" in the symbology of the layer.....right?? Or am I just dreaming.
... View more
12-02-2022
05:17 AM
|
0
|
1
|
1520
|
|
POST
|
Hi, So I am joining a table of inspections to a feature layer. I join the inspections to the features and select "Keep All Target Features", so I can see both the features that have been inspected as well as the ones not inspected. I use the join field to see where there are NULL values....those are the ones that have NOT been inspected. Here is an example: My problem is I need to symbolize based on the FACILITYID field. So I need one symbol for all the NULL values, and another symbol for all the 'other' (or NOT NULL) value. How do I do this? There does not seem to be an obvious way to do this. When I select to symbolize by Unique Values and select the FACILITYID field, it just starts trying to add all the WCV-### values into the window. I only need NULL and NOT NULL, not each individual value. Hopefully that makes sense. Thanks!
... View more
11-28-2022
08:50 AM
|
0
|
5
|
1584
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 08-18-2023 08:57 AM | |
| 1 | 04-19-2018 05:53 AM | |
| 1 | 04-13-2018 10:07 AM | |
| 1 | 04-13-2018 10:04 AM | |
| 1 | 04-13-2018 05:56 AM |
| Online Status |
Offline
|
| Date Last Visited |
02-20-2025
03:53 PM
|