|
POST
|
I am trying to zoom to the extent of a layer that has definitionExpression on it. I cannot get it to zoom to anything but the world view. I want to setViewpontGeometry(queryLayer.fullExtent), but this doesn't seem to work. Do I have to build a view point manually? Connections {
target: map
onOperationalLayersChanged: {
identifyQueryLayer()
queryLayer.definitionExpression = app.definitionQuery
//This doesn't work?
mapView.setViewpointGeometry(queryLayer.fullExtent)
//Do I have to build a viewpoint?
//mapView.setViewpoint(newViewPoint);
}
}
... View more
05-18-2020
07:58 AM
|
0
|
1
|
882
|
|
POST
|
I tried using both ways and neither worked. I feel like I am missing something, but I cant find an example of this anywhere. I need to be able to do this as I just want features not to be visible and not remove them from the definition query. Does anyone know of some code examples of this anywhere? I looked through the entire qt samples and a quick internet search and I came up with nothing. For now I have to remove the definition query before I search and refresh my layer, then add the query back in after the search returns all the features, this is suboptimal at best.
... View more
04-23-2020
11:11 AM
|
0
|
1
|
875
|
|
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
|
929
|
|
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
|
1438
|
|
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
|
480
|
|
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
|
2059
|
|
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
|
2059
|
|
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
|
961
|
|
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
|
2328
|
|
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
|
2415
|
|
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
|
2080
|
|
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
|
2059
|
|
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
|
2080
|
|
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
|
2192
|
|
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
|
1645
|
| 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 |
01-27-2026
08:03 AM
|