POST
|
I guess I spoke too soon. While setting the data to selected features did solve the initial problem, it also broke the application, and I had to rebuild the app piece by piece several times before I finally found the culprit . Switching to Selected Features also sneakily changed the Configure Fields section to Use Layer Settings, and for some reason that also eliminates editing capabilities. I can't think of any logical reason why it would do that, is this a Bug???
... View more
3 weeks ago
|
0
|
1
|
157
|
POST
|
I'm building a simple Experience app that allows the user to edit a few fields of a selected feature. I used map, table, and select widgets to do this. The app works as it should so the triggers are al set as they need to be except for one problem: The table is showing all the records when there is no selected feature. In the Data panel for the feature class in question I checked "No Selection View" and configured a view for "ObjectID is Blank". The table preview in the dialog where you configure the view shows that the filter returns no records. However, when running the app the table is still showing all records - I must be missing something somewhere... Initially I wanted to use a list widget instead of a table widget for this but concluded there was no way to show values for several fields of a record, nor make anything editable in there. Did I conclude wrongly?
... View more
4 weeks ago
|
0
|
4
|
249
|
POST
|
I'm having problems with select by location: it doesn't select anything if the layers involved have definition queries. I know there are a number of functions in ArcMap that don't respect definition queries - is this just another one? Yes, I've tried doing the same thing on the same datasets but without definition queries and it works like it should...
... View more
05-21-2024
10:18 AM
|
0
|
1
|
293
|
POST
|
Thank you Josh. That makes sense for the first issue. Haven't been able to try it out because it happens randomly and hasn't happened since I posted. Not sure how I would "lose" the active template. For the second issue, Yes, I had snapping on but no inferences. My fabric is not very big but the issue is now happening on every line even the first one. Pro is allegedly multi-threaded, but in reality I think there's only two threads, one for the UI (which runs the parts of the tool in the panel) and the other one that does any data manipulation. So I think you're right in that if the data manipulation takes longer then the UI never gets around to advancing.
... View more
03-30-2023
04:51 PM
|
0
|
0
|
1275
|
POST
|
I've found another issue with the align features tool: My parcels documents use two different spatial references in meters as well as feet and thus I have to switch my map between all these. Obviously the features in the parcel fabric are all in the spatial reference, but if my map is not set to fabric's spatial reference then align features doesn't work.
... View more
03-30-2023
04:29 PM
|
0
|
0
|
1175
|
POST
|
I'm having some issues using the traverse tool, not sure if these are bugs or "features". I'm using v2.81 Isuue 1: I sometimes loose the polyline, 2PT line, and trace tools that are located below the line where you enter bearing, distance, radius etc. When this happens I can still enter direction and distance, but hitting the enter then moves the cursor to the radius field instead of creating the line. This seems to happen randomly, and the only way to fix it is to restart pro. First picture shows the problem, second one shows the traverse tool as it appears when working properly. Issue 2: Sometimes and randomly, usually after I have entered a number of boundary segments, hitting enter to create the next segment I get the little dialog below that pops up for a few seconds and then you have to hit enter again to advance to the next line. While it still works then. this is a really annoying inconsistency in how the tool works since this dialog normally does not pop up and the cursor moves to the next line automatically.
... View more
03-26-2023
05:03 PM
|
0
|
3
|
1355
|
POST
|
Thanks for the reply. I was just contemplating building something that would iterate through all feature-classes in a database and list any defined attribute rules, their types and expressions. Then possibly change a constraint rule to a validation rule as these often seem like a good idea until you discover how disruptive they can be to editing processes and you would rather deal with rule issues after the fact. I'm also trying to figure out how those rules are implemented - a wild guess is that they are stored in a special table in the database, then retrieved and applied in response to some event.
... View more
02-23-2023
02:46 PM
|
0
|
1
|
572
|
POST
|
Does the ArcGis Pro SDK for .Net expose AtrributeRules? I have found some classes in ArcGIS.Core.Data but they only deal with evaluating existing rules and AttributeRule Errors, but nothing on enumerating or examining what those existing rules are. Haven't come across anything in snippets or samples either.
... View more
02-19-2023
05:09 PM
|
0
|
3
|
650
|
POST
|
Thank you for the reply, Wolf. My search did not come up with the post you linked; It gave me an understanding of why this was happening. Seems like a bug only in so far as the EditOperation's ErrorMessage is misleading. Not doing anything when it is not given anything to do isn't really a failure.
... View more
07-21-2022
05:46 PM
|
1
|
0
|
517
|
POST
|
Is there a way to get more information when an EditOperation fails using the SDK? I have an addin that populates a field in a layer with values and it works fine the first time, but fails when I run it again. Further investigation showed that the edit operation works when the existing values are <null>, but fails if the existing values are not null. But more generally, i would like to get a reason when an EditOperation fails. An abbreviated part of my code: EditOperation assignIDEditOp = new EditOperation();
assignIDEditOp.Name = "assignIDEditOp";
assignIDEditOp.SelectModifiedFeatures = false;
assignIDEditOp.SelectNewFeatures = false;
strID += (j + 1).ToString(fmt);
pInsp = new Inspector(true);
pInsp.Load(pLay, pOID);
pInsp["ID"] = strID;
assignIDEditOp.Modify(pInsp);
isOK = assignIDEditOp.Execute();
if (!isOK)
{
MessageBox.Show(assignIDEditOp.ErrorMessage);
}
... View more
07-19-2022
02:18 PM
|
0
|
2
|
552
|
POST
|
Hello Narelle, Thanks for the quick reply! Even on a Sunday! I tried your snippet, and it works, but only sometimes, and would thus introduce a bug into any addin that uses it. I suspected that the pane caption is just a text property of the pane and not tied tied to the map that the pane contains, and a little test proved this to be so. It appears that the default caption is the name of the map, but if the caption is changed after the pane is created then the snippet thinks the pane doesn't exist and creates a new one. Furthermore, I need to be able to make changes to map that is not active, and was intending to use that broken snippet to get at the map. Is there another way to get at a map object since I now can't traverse down the object hierarchy to find it? I understand the reasoning behind the change from some older version you described, but isn't the usual way ESRI deals with that would be to create a lightweight version of the map object that has only a few key properties to identify it plus a method to retrieve the fully populated map object if needed? Also, there is no OpenMapPaneAsync. I'm using 2.8, maybe new in 3.0? But, OpenMapPane does work and apparently doesn't need to be run on the MCT either. The alternative method that you commented out still relies on being able to get a map from a mapProjectItem which only works if the pane is active. mapProjItem.OpenMapPaneAsync();
... View more
06-26-2022
08:18 PM
|
0
|
1
|
892
|
POST
|
Awaiting the LookupMukey function returns a task not, what the function itself returns. In order to get the list that LookupMukey produces you need List<string> strOutput = await helperclass.LookupMukey().Result;
... View more
06-26-2022
03:52 PM
|
0
|
0
|
14718
|
POST
|
I want to be able to open (activate) a MapPane with a specific map if it exists, or create it if it doesn't but can't figure out how to accomplish this. Logically, I can get all the MapPanes with this: var mapProjItems = Project.Current.GetItems<MapProjectItem>(); Each of the MapPanes in there *should* have a map, and if I iterate through there, I can activate the pane if the map's name is the one I want, or create a new one if it is not found. The problem is that only the MapPane that is currently active has a map, for all the others the map property is null. There is a Pro Snippet called "Get the Unique List of Maps From the Map Panes" and it crashes because of the same problem: public static IReadOnlyList<Map> GetMapsFromMapPanes()
{
//Gets the unique list of Maps from all the MapPanes.
//Note: The list of maps retrieved from the MapPanes
//maybe less than the total number of Maps in the project.
//It depends on what maps the user has actually opened.
var mapPanes = ProApp.Panes.OfType<IMapPane>()
.GroupBy((mp) => mp.MapView.Map.URI).Select(grp => grp.FirstOrDefault());
List<Map> uniqueMaps = new List<Map>();
foreach (var pane in mapPanes)
uniqueMaps.Add(pane.MapView.Map);
return uniqueMaps;
} There is another snippet called "Find a map within a project and open it", but it always creates a new MapPane (so then you have two with the same name and map) because of the same problem. And there is also the MapProjectItem.OpenMapPane() method, but it too creates a new MapPane. This should be so simple to do...
... View more
06-26-2022
03:30 PM
|
0
|
4
|
932
|
POST
|
In an addin i'm creating there's a button that will add a raster layer to my map based on a selected value in a listbox. The code is simple and works fine: the new layer appears in the TOC and the image appears on the map, but curiously all visibility checkboxes on layers in the TOC become greyed out for a while. After a minute or so, they become enabled again. I'm guessing something is going on in a background thread that is setting the visibility checkboxes to disabled while it is doing whatever it is doing. The question is what is it doing? The images are around 10mb each and georeferenced. private async void cmd_ButtonAdd_Click(Object sender)
{
Layer pImgLay;
string url = selectedObliqueVal;
url = m_imgPath + m_Isle + m_imgFolder + "A" + url.Substring(1, 1) + @"\" + url + ".jpg";
if (!System.IO.File.Exists(url))
{
MessageBox.Show("File does not exist:\r\n" + url);
return;
}
pImgLay = await QueuedTask.Run(() => { return LayerFactory.Instance.CreateLayer(new Uri(url), MapView.Active.Map); });
_addedImages.Add(url);
//MessageBox.Show("Add");
}
... View more
05-19-2022
01:54 PM
|
0
|
0
|
264
|
Title | Kudos | Posted |
---|---|---|
1 | 06-09-2020 12:58 PM | |
1 | 07-21-2022 05:46 PM | |
1 | 02-05-2022 08:16 PM | |
1 | 12-21-2021 12:52 PM | |
1 | 09-10-2021 07:01 PM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|