|
POST
|
To fix the scale of a map on a Layout u need to set a display constraint on the frame. See here https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Layouts#map-frame-display-constraints. Look at fixed scale and fixed center and scale.
... View more
05-07-2024
08:56 AM
|
0
|
1
|
1077
|
|
POST
|
it is clear from your post that you are experiencing some kind of asynchronicity that u are trying to counter act with "await". "await QueuedTask.Run(() => { .... code here })" is the correct pattern to "a wait" the execution of something that is running on the MCT....so, given that u already know this, can u explain what the behavior is you are seeing vs what you are/were trying to accomplish? Please put all the code in question here and not just the new Geodatabase one liner.
... View more
05-07-2024
07:57 AM
|
0
|
0
|
1658
|
|
POST
|
EDIT: lol - well, after just finishing writing this reply it struck me that maybe it is _not_ the "show selection graphic behavior" that you are after! Somewhat presumptive on my part, apologies - that said, just in case, and/or if someone else _is_ (who reads this post) I will leave my reply...and we will still add this to the SelectionEnvironment at 3.4. it looks like this was never exposed in the selection environment public api - https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic14140.html What you are looking for is the equivalent to the "Display the interactive selection graphic" checkbox on the Application selection settings UI. I will pass this on to the dev team for 3.4. In the meanwhile, this will work (but requires use of an internal namespace) - maybe do this in the tool activate and set it back to the previous setting when your tool is deactivated - your call. //fyi
using ArcGIS.Desktop.Internal.Mapping;
...
internal class MySelectionTool : .... {
...
public void SetShowInteractiveSelectionGraphic(bool showGraphic) {
var map_module_internal =
FrameworkApplication.FindModule("esri_mapping") as
IInternalMappingModule;
//Must be called on the QueuedTask! or will throw
//CalledOnWrongThreadException
map_module_internal.SelectionSettings.
SetShowInteractiveSelectionGraphic(showGraphic);
}
public bool GetShowInteractiveSelectionGraphic()
{
var map_module_internal =
FrameworkApplication.FindModule("esri_mapping") as
IInternalMappingModule;
//should be fine being called from the UI thread
return map_module_internal.SelectionSettings.
ShowInteractiveSelectionGraphic;
}
...
//usage
internal bool _keepShowSelectionGraphicSetting = false;
//somewhere - perhaps tool activation
QueuedTask.Run(() => {
_keepShowSelectionGraphicSetting =
this.GetShowInteractiveSelectionGraphic();
if (!_keepShowSelectionGraphicSetting)
this.SetShowInteractiveSelectionGraphic(true);
...
});
//somewhere - perhaps tool deactivation
QueuedTask.Run(() => {
if (_keepShowSelectionGraphicSetting !=
this.GetShowInteractiveSelectionGraphic())
this.SetShowInteractiveSelectionGraphic(
_keepShowSelectionGraphicSetting);
...
});
... View more
05-03-2024
06:07 PM
|
0
|
0
|
1386
|
|
POST
|
From the development team - there is not a fullproof workaround unfortunately - however they suggest that MapView.LookAtCamera and it’s x, y, z values might be your best option. They r looking at this for 3.4. https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic20825.html
... View more
04-26-2024
08:52 AM
|
0
|
0
|
761
|
|
POST
|
thanks for this. we have passed this on to the development team to be addressed for the next release (3.4)
... View more
04-26-2024
08:47 AM
|
0
|
0
|
1174
|
|
POST
|
is something like map.GetDefinition().ToJson() good enough?
... View more
04-23-2024
10:53 AM
|
0
|
1
|
1288
|
|
POST
|
The Roaming attribute is a little bit hidden. I agree it can be a little bit tricky to get the value to display. With any property selected in the settings designer grid, show the Visual Studio properties grid (usually co-located with the Solution Explorer). U will see a property called "Roaming" with a default value of **false**. Change as needed.
... View more
04-17-2024
11:38 AM
|
2
|
1
|
1226
|
|
POST
|
i think you are trying to do something like this: https://stackoverflow.com/questions/1472498/wpf-global-exception-handler I, myself, have never tried it.
... View more
04-17-2024
11:14 AM
|
0
|
0
|
933
|
|
POST
|
Modules are lazy loaded when autoLoad=false - the default. Thus, the module initialize will fire when the first "action" occurs that triggers module loading - for example - a button click on the ribbon (which is the most common) or a previously open dockpane is re-opened at the beginning of the session. At that time, before _anything_ else, the Module is constructed (eg new Module1() {}) and Initialize is called. Then everything else. Obviously, the coding pattern for Initialize can get a bit tricky when autoLoad=false because the timing of when it will occur within a given session will change (depending on when the first action that triggers module loading occurs). Setting autoLoad=true means that the Module will always load at the same time at the beginning of the session regardless of when the first action or "use" occurs.
... View more
03-22-2024
10:50 AM
|
0
|
1
|
2077
|
|
POST
|
Note: i used 3.3, .NET 8 (just happens to be what i hv on my box). So u will need to change the target fwk back to .NET 6 and fix references - just use the Pro SDK tool for that.
... View more
03-19-2024
10:15 AM
|
1
|
1
|
5444
|
|
POST
|
can u point me to the incorrect documentation please? I did a quick scan of https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Map-Exploration#mapcontrol but didnt see a reference to Mouse events....I wld like to correct it. fyi: perhaps because u r "seeing" the inherited events from the base WPF UIElement class on the api reference? https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic12547.html#EventsBookmark If u uncheck "Include Inherited Members" u will see only the events implemented on the map control itself
... View more
03-19-2024
09:25 AM
|
0
|
1
|
2376
|
|
POST
|
i think this post will help: https://stackoverflow.com/questions/23108045/how-to-make-observablecollection-thread-safe I think the issue u r running into is based on how u r handling the observable collections in your view model. Two things: 1 - you must lock them (see article above) 2 - Once you assign them do NOT re-assign them because that will break the binding (ie, once u do this: var _regions = new ObservableCollection<Regions>(); do _not_ do this....._regions = some_new_list. I also added virtualization to your region combo box. It was choking if u hit the dropdown _before_ selecting a commune (i was getting some 50,000 odd regions in the collection for the area i was using). Without virtualization, the combobox freezes when trying to fill the dropdown if there are too many values in the Regions list. look at this post for help on virtualization: https://stackoverflow.com/questions/8198645/wpf-combobox-performance-problems-by-binding-a-large-collections With your permission i will add the zip to the post containing the downloaded code from your repo w/my edits
... View more
03-18-2024
06:28 PM
|
1
|
0
|
5469
|
|
POST
|
the screenshot looks normal. Ribbon commands, tools, etc. are disabled, not frozen, while the queued task is running. If you mouse over the ribbon do u get tooltips? does the ribbon re-paint if u drag another window over the top of it? If yes then the UI is remaining responsive and operating normally. Frozen would imply exactly that - no response to mouse over, no repaint, etc. which is different. Note that your TOC looks enabled which is also normal. U shld be able to change the visibility of layers, etc. while the queued task is running also.
... View more
03-18-2024
12:00 PM
|
0
|
2
|
5483
|
|
POST
|
This is not currently supported. Thank u for the requirement. We will look into adding event subscription for the control at 3.4.
... View more
03-15-2024
03:26 PM
|
0
|
4
|
2398
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Tuesday | |
| 1 | 3 weeks ago | |
| 1 | 01-08-2026 02:03 PM | |
| 1 | 01-08-2026 02:15 PM | |
| 3 | 12-17-2025 11:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|