|
POST
|
I have a list of features that I want to set the visibility on for on a feature layer. I don't want to change the definition expression because I requery the layer periodically to get the latest attributes, I have to remove and readd the definition query. I do something like this, but I cant seem to get it to work. property var allFeatures: ({})
property var searchFeatures: ({})
property Layer queryLayer: null
onLengthChanged: {
searchFeatures = {}
for (var i = 0; i < listModelFields.count; i++) {
searchFeatures[id] = features[id]
}
queryLayer.setFeaturesVisible(searchFeatures)
}
The above snippet just shows where i am trying to apply the setFeaturesVisible. I basically have a search bar, that when the length changes, I want the visible features to change with the filter this search bar performs on the model. But with my list of features I cant seem to get them show or hide, in fact the code actually breaks. Has anyone tried this function.
... View more
04-23-2020
08:01 AM
|
0
|
3
|
757
|
|
POST
|
In my configuration I have a "Load Map" function that loads all of the Feature Services on the Map and Renders them for the user. With the new Undo/Redo functionality for the Feature Service I am working on getting my users used to it. However, when i load a map, add the Layers, and Render the Layers, the undo button becomes available to the user, even if I save edits and save project in the code. I don't want the user to be able to undo my rendering and layer loading? I want them to start off with no Redo or Undo available. The OperationManager doesn'ts seem to have any entries in it? //I don't know how to even find the categories available, but I want to remove all of them anyways and start with blank undo/redo stack
//Here is my initial attempt (Category??)
OperationManager _operationManager = new OperationManager();
//Nothing
List<Operation> ops = _operationManager.FindUndoOperations(o => o.Category == "Update Map Properties");
//Nother with != either
//So it must be empty?
ops = _operationManager.FindUndoOperations(o => o.Category != "Update Map Properties");
//This will fail/error as ops is empty
_operationManager.RemoveUndoOperation(ops.First());
... View more
03-04-2020
11:00 AM
|
0
|
2
|
1166
|
|
POST
|
I have noticed that SaveEditsAsync quickly followed by RedrawAsync will result in a performance hit. If there is no edits between the two commands, RedrawAsync seems to take some time. I have tested this by making a new edit button that does the following that just saves the edits and redraws the map. internal class SaveEditsAsync : Button
{
protected async override void OnClick()
{
await Project.Current.SaveEditsAsync();
await MapView.Active.RedrawAsync(true);
}
} This time becomes bigger than if I just SaveEditsAsync, then make a vertices change, then RedrawAsync using OOB tools.I cant seem to put saveedits and redrawasync back to back. Has anyone else noticed this? If I do an edit in between calling them I am fine.
... View more
02-24-2020
01:05 PM
|
0
|
0
|
392
|
|
POST
|
I had to add the section like this below in order to get the config to save. It now works and I can create the section. if (editingSection == null)
{
ClientSettingsSection customSection = new ClientSettingsSection();
customSection.SectionInformation.AllowExeDefinition = ConfigurationAllowExeDefinition.MachineToLocalUser;
group.Sections.Add("ArcGIS.Desktop.Editing.Settings", customSection);
editingSection = group.Sections["ArcGIS.Desktop.Editing.Settings"] as ClientSettingsSection;
}
... View more
02-21-2020
01:05 PM
|
0
|
0
|
1397
|
|
POST
|
This code fails when the user loads their Map for the first time as the section ArcGIS.Desktop.Editing.Settings Is not present in the user.config. When i try to create the section it says the config is locked. I need to be able to get to that flag at startup regardless of whether the section is currently there? How can I make the section at startup? This doesn't work right now when I do config.save. Again this is on the first time map load, remove user.config and the code should break at config.save I had to account for the editingsection missing and then create it. I can't seem to accomplish this private void SetDontShowFSEditNotificationSetting(bool dontShow)
{
var config = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal);
var group = config.SectionGroups[@"userSettings"] as ConfigurationSectionGroup;
var editingSection = group.Sections["ArcGIS.Desktop.Editing.Settings"] as ClientSettingsSection;
//I NEED TO CREATE THE MISSING SECTION ON FIRST TIME LOAD
if (editingSection == null)
{
ClientSettingsSection customSection = new ClientSettingsSection();
group.Sections.Add("ArcGIS.Desktop.Editing.Settings", customSection);
editingSection = group.Sections["ArcGIS.Desktop.Editing.Settings"] as ClientSettingsSection;
}
var dontShowSetting = editingSection?.Settings.Get(ProMapBlackModule.DontShowFSEditNotificationSetting);
//null check...
if (dontShowSetting == null)
{
//create a new value
var element = new SettingElement(ProMapBlackModule.DontShowFSEditNotificationSetting,SettingsSerializeAs.String);
var xElement = new XElement(XName.Get("value"));
XmlDocument doc = new XmlDocument();
XmlElement valueXml = doc.ReadNode(xElement.CreateReader()) as XmlElement;
valueXml.InnerText = dontShow.ToString();
element.Value.ValueXml = valueXml;
editingSection.Settings.Add(element);
}
else
{
//change the value
XmlDocument doc = new XmlDocument();
var sr = new StringReader(dontShowSetting.Value.ValueXml.OuterXml);
XmlElement valueXml = doc.ReadNode(XmlReader.Create(sr)) as XmlElement;
valueXml.InnerText = dontShow.ToString();
dontShowSetting.Value.ValueXml = valueXml;
}
//THIS WILL FAIL WITH LOCK ERROR
config.Save();
}
... View more
02-21-2020
12:29 PM
|
0
|
0
|
1397
|
|
POST
|
In the new version of ArcGIS Pro 2.5.0, the /Config Switch on the command line or shortcut target has changed. I upgraded from 2.3, and my command line used to be this "C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe" /config:MYPROGRAM.proConfig.X now it has to be this "C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe" /config:MYPROGRAM The problem with this, is that I configured a shortcut that was added to the users desktop to use the former, now I must run an install program on all of my user machine to remove and update the shortcut on all my users desktops? Is this a known issue and is there any type of workaround I can do?
... View more
02-21-2020
07:52 AM
|
0
|
2
|
754
|
|
POST
|
It seems like this is happening because my map is creating an overlay and it takes a small amount of time. If I close the toolbox before the overlay process is done, my overlay is not proper cleaned. I need a way to disable my close or save buttons on my tool dock if the tool is still drawing.
... View more
02-19-2020
09:34 AM
|
0
|
1
|
2042
|
|
POST
|
I have a tool that adds overlays to the map. I then dispose of the map items when my Tool Deactivates. But for some reason, sometimes a graphic gets left behind and there is no way to get rid of it. Is there a programmatic way to get all the disposible items on a map and clear them or otherwise interact with them?
... View more
02-18-2020
02:13 PM
|
0
|
3
|
2129
|
|
POST
|
That is what I was looking for, thank you. I ended up using my solution above, as i needed to fetch any server changes on the SaveEdits click. So I added this to my button logic to get the latest server updates. await Project.Current.SaveEditsAsync(); await MapView.Active.RedrawAsync(true);
... View more
02-13-2020
07:59 AM
|
0
|
0
|
1728
|
|
POST
|
This worked great. I will remove the code for 2.6, but I put this in the initialize of my module to only change the value if the user has the initial value or somehow set it to show. bool DontShowEditWarning = GetDontShowFSEditNotificationSetting(); if (!DontShowEditWarning) { SetDontShowFSEditNotificationSetting(!DontShowEditWarning); }
... View more
02-12-2020
11:06 AM
|
0
|
0
|
1397
|
|
POST
|
I went ahead and made my on button reference to code. And here that is, but is this more simple than what I did here just to change the caption? <button refID="MyButtons_SaveEditsAsync" size="large" /> <button id="MyButtons_SaveEditsAsync" condition="esri_editing_CanSaveCondition"
caption="SAVE EDITS CHANGE HERE"
className="MyButtons.SaveEditsAsync" keytip="Z4" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/EditingSaveEdits_B_32.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/EditingSaveEdits_B_32.png">
<tooltip heading="Save Edits">
Save all edits made since the last save. After saving you cannot undo previous editing operations.<disabledText />
</tooltip>
</button> using ArcGIS.Desktop.Core;
using ArcGIS.Desktop.Framework.Contracts;
namespace MyButtons
{
internal class SaveEditsAsync : Button
{
protected async override void OnClick()
{
await Project.Current.SaveEditsAsync();
}
}
} Here is where I found the conditional for the OOB Button DAML ID Reference Editing.daml · Esri/arcgis-pro-sdk Wiki · GitHub Here is where I found the image for the OOB Button DAML ID Reference Icons · Esri/arcgis-pro-sdk Wiki · GitHub
... View more
02-12-2020
08:27 AM
|
0
|
0
|
1728
|
|
POST
|
In my configuration project I have Set a limitied number of buttons for my users. Now with 2.5 release I need to put the esri_editing_SaveEditsBtn in the tool bar too. The only problem is that I want the caption to say "Save Edits" and not "Save". I have the Save Project button their too, but want to the edits button to have the different caption. Is there a way to simply do this or do i need to define a button with a new class and put Project.Current.SaveEditsAsync(); as the only function in that class? Then make the new button ref in the daml with my updated caption? //OLD, i want to changed the caption for this Button to say "Save Edits" to distinguish it from Save for Project <button refID="esri_editing_SaveEditsBtn" size="large" /> //I want to do something like this to override it? Or do I have to do the code to accomplish this <button id="esri_editing_SaveEditsBtn" caption="Save Edits" </button>
... View more
02-12-2020
07:52 AM
|
0
|
3
|
1840
|
|
POST
|
I think we can close this discussion. I launch a wpf form from the Row Create or Row Change. I use to use applyasync on any changes made to my object that was loaded as an inspector from the ROW. I still load the inspector from the row, but I now store the row and not apply on the inspector. This seems to have fixed almost everything. Except I need to MapView.Active.RedrawAsync(false) in order to see the shape change in the Row Create (and before i show the wpf). This seems to work pretty well for now.
... View more
02-12-2020
07:31 AM
|
0
|
0
|
1223
|
|
POST
|
I think the reason this was happening is because when I enter a rowcreate or rowchange event I load the inspector with the row. In those events I have WPF forms that show, which works just fine. HOWEVER, when the Row with a certain shape comes in, I need to change the shape of that Row based on what it interesects or what other shapes it needs to be confined within. When you use Row.Store, the UI doesn't reflect the shape change immediatly, so I was using inspector.apply, which immediatly changed the shape on the UI. When I now set the Shape, and perform Row.Store, the UI doesn't reflect this behind the WPF form that is loaded as a dialog. I need the UI to reflect the shape changes or refresh the UI, and I think I will have this fixed. Inspector.ApplyAsync was the problem for sure.
... View more
02-11-2020
10:59 AM
|
0
|
2
|
1223
|
|
POST
|
private static void Cleanup(MapMember inMapMember) { FeatureLayer fl = inMapMember as FeatureLayer; fl.ClearDisplayCache(); } This doesn't appear to have any positve affect. The only fix is to remove and readd the layer. This appears to happen when loading an Inspector in the onchange or oncreate events.
... View more
02-10-2020
07:08 AM
|
0
|
0
|
1223
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-23-2018 06:49 AM | |
| 1 | 08-02-2023 08:28 AM | |
| 1 | 01-03-2020 10:54 AM | |
| 1 | 11-30-2017 06:41 AM | |
| 1 | 08-20-2018 01:10 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-22-2025
04:33 AM
|