|
POST
|
"Regular" feature classes support schema locking and schema edits allowing (certain) changes to the schema to be made (restrictions apply - no pending edits, no edit session, etc, etc). Plugin datasources are readonly and the schema is fixed.
... View more
06-12-2024
05:36 PM
|
0
|
0
|
782
|
|
POST
|
The pattern looks something like this but I dont think it is going to give u the results you are hoping for: internal class MapTool1 : MapTool {
private DelayedInvoker _invoker = new DelayedInvoker(50);
...
protected async override void OnToolMouseMove(MapViewMouseEventArgs e){
//do something with the invoker
_invoker.InvokeTask(() => {
return QueuedTask.Run(() => {
var mpt = MapView.Active.ClientToMap(e.ClientPoint);
//Do something with the point
}); Basically, just like a "QueuedTask.Run(() => { ........... })" you can wrap whatever u want to be invoked with the delay (50ms in this case) within the "_invoker.InvokeTask" lambda. So, in this case, if I am tracking the cursor position w/ the invoker I will be "processing" its position every 50ms (or whatever delay u specify) which will be quite jittery and so on. In the Pro SDK are a number of samples where we implement logic to cut down on unnecessary mouse movement - just search for "MouseMove" and you will see them - they are all using the same, basic pattern and are updating the graphics overlay in different ways. https://github.com/search?q=repo%3AEsri%2Farcgis-pro-sdk-community-samples%20mousemove&type=code I suggest using something built around the pattern they are using rather than the delayed invoker. Another way, that I have used from time to time, is this basic pattern: internal class SelectOnMove1 : MapTool
{
private Point _lastLocation;
private int _deltaPixels = 0;
protected override Task OnToolActivateAsync(bool active) {
if (_deltaPixels == 0)
//usually 3 pixels - use whatever number u want
_deltaPixels = SelectionEnvironment.SelectionTolerance;
protected async override void OnToolMouseMove(MapViewMouseEventArgs e) {
//compare current cursor position to last (captured) position
if (_lastLocation.X >= e.ClientPoint.X - _deltaPixels &&
_lastLocation.X <= e.ClientPoint.X + _deltaPixels &&
_lastLocation.Y >= e.ClientPoint.Y - _deltaPixels &&
_lastLocation.X <= e.ClientPoint.X + _deltaPixels)
return;//within tolerance - ignore
_lastLocation = e.ClientPoint; //we'll use this one
//TODO - use the point
However, it is going to be v difficult to get truly smooth tracking and it will always be a little laggy/jittery. Your mileage will vary.
... View more
06-11-2024
10:54 AM
|
2
|
0
|
691
|
|
POST
|
the sdk will follow the behavior of the UI. Add field on a geopackage must not be supported.
... View more
06-10-2024
10:44 AM
|
0
|
0
|
887
|
|
POST
|
if u add a layer using a geopackage via the UI do u get the same behavior?
... View more
06-06-2024
07:38 AM
|
0
|
1
|
933
|
|
POST
|
On the modify dockpane those are commands ("buttons") firing, not tools - which, as i think u have found out, activate a dockpane. The only event I see that is associated with this is the ActiveWindowChangedEvent. I think it may fire multiple times depending on the context (map becoming active, dockpane inactive and vice versa). From this event, u can determine if a dockpane is being activated (in which case "Window" will be a Dockpane) but Im not sure if that gets u further along... ArcGIS.Desktop.Framework.Events.ActiveWindowChangedEvent.Subscribe(
(args) => {
if (args.Window is DockPane dockPane){
//a dockpane is being activated
var id = dockPane.ID;
var caption = dockPane.Caption;
//etc, etc
}
});
... View more
05-28-2024
04:58 PM
|
0
|
1
|
1507
|
|
POST
|
if I understand u correctly >>My requirement is in this case that already open dock pane should open.<< then call Activate() on your dockpane. DockPane pane = FrameworkApplication.DockPaneManager.Find("Acme_Dockpane1");
pane?.Activate();
... View more
05-28-2024
10:41 AM
|
1
|
1
|
1529
|
|
POST
|
RegisterAddin.exe was moved to a common folder at 3.3. I suspect that the issue u r running into is that the 3.1, 3.2 Nuget still references RegisterAddin.exe in the Pro bin folder. Addins not using the Nuget reference RegisterAddin.exe via the .targets file in the bin folder so wont experience the same behavior. For your purposes of u wanting to use the older Nuget, i think if u copy RegisterAddin.exe into the Pro bin folder u should be good to go. At 3.3, the default location is here: C:\ProgramData\EsriProCommon
... View more
05-13-2024
02:27 PM
|
0
|
1
|
1831
|
|
POST
|
Tyrone, I stand corrected - i did a bit of digging and this is in the public api: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic14160.html https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic14152.html So, u shld be able to do SelectionEnvironment.SetShowSelectionGraphic(true | false). SelectionEnvironment.ShowSelectionGraphic will give u the current "show graphic" value. "SetShowSelectionGraphic" must be called on the MCT via QueuedTask.Run. SelectionEnvironment is a static class within ArcGIS.Desktop.Mapping
... View more
05-09-2024
04:45 PM
|
0
|
0
|
1002
|
|
POST
|
ok, so this might take a cpl of back and forths - can u remove the "return Task.CompletedTask" bit - I am also thinking it wont compile with that....also, perhaps there is some more copy/paste "baggage" here?.....can this... var fileGdbConnPath = new FileGeodatabaseConnectionPath(new Uri(gdbPath, UriKind.Absolute));
Geodatabase gdb = new Geodatabase(fileGdbConnPath);
string workspaceConnectionString = gdb.GetConnectionString();
using (var fileGdb = new Geodatabase(fileGdbConnPath)){ be changed to this var fileGdbConnPath = new FileGeodatabaseConnectionPath(
new Uri(gdbPath, UriKind.Absolute));
using (var fileGdb = new Geodatabase(fileGdbConnPath))
{
string workspaceConnectionString = fileGdb.GetConnectionString();
...
} and then let's go from there.
... View more
05-08-2024
09:50 AM
|
1
|
0
|
1323
|
|
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
|
817
|
|
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
|
1393
|
|
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
|
1086
|
|
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
|
559
|
|
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
|
808
|
|
POST
|
is something like map.GetDefinition().ToJson() good enough?
... View more
04-23-2024
10:53 AM
|
0
|
1
|
1018
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 2 | 12-17-2025 11:33 AM | |
| 1 | 12-17-2025 01:16 PM | |
| 1 | 10-14-2025 05:01 PM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|