IDEA
|
With ArcGIS Pro SDK 3.x it is possible to get the mouse position (ground point) in the Stereo Map, both in a Custom Tool and in a Custom Button. It is not possible, however, to set the mouse position.
... View more
11-26-2023
01:19 AM
|
0
|
0
|
196
|
POST
|
I forgot to await editingTemplate?.ActivateToolAsync"<dummy_tool_id>") . The correct code is: await QueuedTask.Run(async () =>
{
var layer = LayerUtils.GetFeatureLayerByName(layerName);
EditingTemplate template = layer?.GetTemplate(editTemplateName);
await template?.ActivateToolAsync(toolId);
});
... View more
11-24-2023
07:23 AM
|
0
|
0
|
618
|
POST
|
Thank you Gintautas! Calling FrameworkApplication.SetCurrentToolAsync("<dummy_tool_id>") before calling StartSketchAsync() works. Calling editingTemplate?.ActivateToolAsync"<dummy_tool_id>") before calling StartSketchAsync() doesn't work, however. Why?
... View more
11-24-2023
07:05 AM
|
0
|
2
|
622
|
POST
|
The Stealth Mouse and Soft Mouse are supported in ArcGIS Pro 3.2. These are great news! I really like the GUI to assign functions to the buttons of the 3D mice. Enhancement requests: https://community.esri.com/t5/arcgis-image-analyst-ideas/it-should-be-possible-to-assign-custom-buttons-to/idi-p/1353409/jump-to/first-unread-message https://community.esri.com/t5/arcgis-image-analyst-ideas/3d-mice-it-should-be-possible-to-save-button/idi-p/1353445/jump-to/first-unread-message https://community.esri.com/t5/arcgis-image-analyst-ideas/stealth-mouse-it-would-be-nice-if-different-button/idi-p/1353446/jump-to/first-unread-message
... View more
11-24-2023
06:29 AM
|
0
|
0
|
306
|
IDEA
|
The Stealth Mouse and Soft Mouse are supported in ArcGIS Pro 3.2. These are great news! I really like the GUI to assign functions to the buttons of the 3D mice. Enhancement requests: https://community.esri.com/t5/arcgis-image-analyst-ideas/it-should-be-possible-to-assign-custom-buttons-to/idi-p/1353409/jump-to/first-unread-message https://community.esri.com/t5/arcgis-image-analyst-ideas/3d-mice-it-should-be-possible-to-save-button/idi-p/1353445/jump-to/first-unread-message https://community.esri.com/t5/arcgis-image-analyst-ideas/stealth-mouse-it-would-be-nice-if-different-button/idi-p/1353446/jump-to/first-unread-message
... View more
11-24-2023
05:53 AM
|
0
|
0
|
588
|
POST
|
This is a good idea! I've had the idea with the dummy Map Tool, but I didn't know about the method StartSketchAsync. Unfortunately, after calling StartSketchAsync or StartSketchAsync(editingTemplate), MapView.Active.GetCurrentSketchAsync() still returns null. I now use the following workaround: 1. Activate my Map Tool using the following code: await QueuedTask.Run(() =>
{
var layer = LayerUtils.GetFeatureLayerByName(layerName);
EditingTemplate template = layer?.GetTemplate(editTemplateName);
template?.ActivateToolAsync(toolId);
}); 2. Click with the left system mouse (is button 4 on Stealth Mouse) on the map to digitize the first point of polyline 3. Use my custom button to digitize the remaining points of the polyline (this custom button would be theoretically assigned to a button on Stealth Mouse. (However, it is not possible yet to assign custom buttons to Stealth Mouse, but I hope it will be in the future)).
... View more
11-24-2023
04:42 AM
|
0
|
4
|
634
|
POST
|
I want to create a polyline using a Button, not a Tool (see why below ). I use the following code: protected override async void OnClick()
{
try
{
var spatialRef = GeometryFunctions.CreateLV95SpatialReference();
// Get mouse coordinates
System.Drawing.Point screenPoint = Cursor.Position;
System.Windows.Point winPoint = new System.Windows.Point(screenPoint.X, screenPoint.Y);
var cursorPoint = await QueuedTask.Run(() =>
{
return MapView.Active.ScreenToMap(winPoint);
});
// Get current sketch
Polyline existingWbl = await MapView.Active.GetCurrentSketchAsync() as Polyline;
// Add point to current sketch
var newWbl = AddPointToPolyline(existingWbl, cursorPoint, spatialRef);
await MapView.Active.SetCurrentSketchAsync(newWbl);
}
catch (Exception ex)
{
ProPopupMessage.Error(MiscUtils.GetMethodName(), ex.Message);
}
}
private Polyline AddPointToPolyline(Polyline polyline, MapPoint newPoint, SpatialReference spatialRef)
{
PolylineBuilderEx polylineBuilder = new PolylineBuilderEx(spatialRef);
polylineBuilder.HasZ = true;
// Step through all points
List<MapPoint> newPointList = new List<MapPoint>();
if (polyline != null)
{
foreach (var existingPoint in polyline.Points)
{
newPointList.Add(existingPoint);
}
}
newPointList.Add(newPoint);
// Add polyline part
polylineBuilder.AddPart(newPointList);
return polylineBuilder.ToGeometry();
} This code works if there already exists a sketch. If I want to add the first point of the polyline, however, it doesn't show on the stereo map. In ArcObjects, this was possible! Why do I want to create a polyline using a button instead of a tool? I want to use a button on a 3D mouse (https://pro.arcgis.com/en/pro-app/latest/help/analysis/image-analyst/set-up-the-stereo-mapping-stealth-3d-mouse.htm)
... View more
11-23-2023
05:19 AM
|
0
|
7
|
745
|
POST
|
Are there any plans to support Topology DDL operations, i.e. creating a new topology, in the future? GP tools are so slow...
... View more
10-30-2023
02:22 AM
|
0
|
0
|
458
|
POST
|
I want to catch the event when z changes (when I scroll the mouse wheel) in the Stereo Map. In ArcMap, I used the following code in a ToolControl: ((IEditEvents2_Event)_editor).OnCurrentZChanged += OnCurrentZChanged How can I achieve this in ArcGIS Pro? I tried the following method in a MapTool, but this only reacts when x and/or y change: protected override async void OnToolMouseMove(MapViewMouseEventArgs e) Any help is appreciated!
... View more
10-18-2023
06:36 AM
|
0
|
0
|
377
|
POST
|
I noticed that the displacement isn't always 800 m to the right. It varies according to the loaded stereo image pair. On a longer stereo image pair (ADS strip) the displacement is 3.5 km to the right.
... View more
10-09-2023
04:17 AM
|
0
|
0
|
247
|
POST
|
When the regular map is active, I use the following code to make the mouse jump to a specified position: QueuedTask.Run(() =>
{
MapPoint mapPoint = MapPointBuilderEx.CreateMapPoint(x, y, spatialRef);
System.Windows.Point cursorPoint = MapView.Active.MapToScreen(mapPoint);
System.Windows.Forms.Cursor cursor = new Cursor(Cursor.Current.Handle);
Cursor.Position = new System.Drawing.Point((int)cursorPoint.X, (int)cursorPoint.Y);
}); When the Stereo Map is active and I use the same code as above, I get three problems: 1. I cannot specify the z-value 2. The mouse doesn't jump to the correct position on the Stereo Map 3. The position where the mouse jumps to is different each time I change the z-value of the mouse Is there another way to set the mouse position in the StereoMap in the Pro SDK? I haven't found anything.
... View more
10-02-2023
04:40 AM
|
0
|
0
|
327
|
POST
|
When zooming to a polygon feature in the Stereo Map, the position is about 800 meters displaced to the right (I made sure that the polygon has correct z-values): await QueuedTask.Run(async () =>
{
FeatureLayer featLayer = LayerUtils.GetFeatureLayerByName("Polygon");
Feature feature = await FeatureUtils.GetFirstFeatureAsync(featLayer.GetFeatureClass(), false);
MapView.Active.ZoomTo(layer, feature.GetObjectID());
}); The same happens when zooming to a point geometry (please note that the point has a z-value): MapPoint mapPoint = MapPointBuilderEx.CreateMapPoint(2675090, 1245480, 470, spatialRef);
await QueuedTask.Run(() =>
{
MapView.Active.ZoomTo(mapPoint);
}); When zooming to a layer in the Stereo Map through the GUI, the extent is displaced as well. As a workaround I tried to link the Stereo Map and the Map, activate the Map and zoom to the layer in the Map. However, the Stereo Map does not follow the Map. (The other way round, the Map follows the Stereo Map).
... View more
09-28-2023
04:26 AM
|
0
|
1
|
330
|
POST
|
Hello Narelle, this works! I don't need to set the LeftImageColorizer and RightImageColorizer. Thank you very much. Barbara
... View more
09-27-2023
04:06 AM
|
0
|
0
|
683
|
POST
|
Hi Narelle, thank you for your reply! It works now. However, I can only set the data source if there already is a data source set. If I manually clear the data source of the Stereo Map and then add the data source again programmatically, nothing happens. Is this a bug? Thank you, Barbara
... View more
09-14-2023
06:39 AM
|
0
|
2
|
735
|
Title | Kudos | Posted |
---|---|---|
1 | 09-20-2020 02:31 AM | |
12 | 03-06-2024 02:24 AM | |
2 | 02-28-2024 05:37 AM | |
1 | 01-08-2024 05:13 AM | |
1 | 12-22-2023 04:37 AM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|