|
POST
|
We have proverb in my native language: "Butter buttered". So, the same thing is with Envelope and Expand method. Envelope has own Expand method: var sr = SpatialReferenceBuilder.CreateSpatialReference(8826);
MapPoint minPt = MapPointBuilderEx.CreateMapPoint(2456480, 1307526, sr);
MapPoint maxPt = MapPointBuilderEx.CreateMapPoint(2456895, 1307790, sr);
EnvelopeBuilderEx builderEx = new EnvelopeBuilderEx(minPt, maxPt, sr);
Envelope envelope = builderEx.ToGeometry();
var expandedExtent = envelope.Expand(1.5, 1.5, true); It works as expected without QueuedTask.Run. It could be a bug in GeometryEngine method.
... View more
02-04-2025
02:06 AM
|
1
|
1
|
2574
|
|
POST
|
@DanNarsavage_IDWR Yes, you are right. Expand methos doesn't need to be run within QueuedTask.Run. I think issue is with your returned geometry (from GetGeometry method) extent. Try to check extent for null and for IsEmpty.
... View more
02-03-2025
09:26 AM
|
0
|
3
|
2589
|
|
POST
|
Hi, Take a look at these: https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Asynchronous-Programming-in-ArcGIS-Pro ArcGIS Pro SDK for .NET: Synchronous and Asynchronous Custom Method Design - YouTube Shortly. If you want something return from asynchronous method you need to use Task<return_data_type>. That method could contain QueuedTask.Run or orther .NET methos which returns Task. You can make synchronous method and call QueuedTask.Run outside method. Below two samples with your mehod implemetation: public Envelope GetExtent()
{
var geometry = GetGeometry();
var extent = geometry.Extent;
var geometryEngine = GeometryEngine.Instance;
return geometryEngine.Expand(extent, 1.5, 1.5, true);
}
var newExtent = await QueuedTask.Run(() =>
{
return GetExtent();
}); or public Task<Envelope> GetExtentAsync()
{
var geometry = GetGeometry();
var extent = geometry.Extent;
var geometryEngine = GeometryEngine.Instance;
return QueuedTask.Run(() =>
{
return geometryEngine.Expand(extent, 1.5, 1.5, true);
});
}
var newExtent = await GetExtentAsync();
... View more
02-02-2025
06:21 AM
|
0
|
5
|
2620
|
|
POST
|
You are right. JobsManager belongs to ArcGIS.Desktop.Workflow.Models namespace. Overview of name namespace states: "The ArcGIS.Desktop.Workflow.Models provides access to retrieving jobs and configuration information from the Workflow Manager Classic database.". I don't know about compatibility.
... View more
01-29-2025
10:39 PM
|
0
|
0
|
1618
|
|
POST
|
Hi, All information related to LinearReferencing you can found in ArcGIS Pro SDK API reference Suggestions for your code migration you can find here.
... View more
01-28-2025
11:29 PM
|
1
|
0
|
1904
|
|
POST
|
Hi, For now, my answer to your additionally question is it possible to create a job from the SDK. Yes, it is possible. There is CreateNewJob method from JobsManager. // CreateJob returns an ID of a new job
// it is a passed a valid job type ID as an integer
var wfCon = await WorkflowModule.ConnectAsync();
var jobManager = wfCon.GetManager<JobsManager>();
var jobID = jobManager.CreateNewJob(jobTypeID);
... View more
01-28-2025
10:40 PM
|
0
|
2
|
1645
|
|
POST
|
Hi, You are talking about CIMLabelClass Expression method. Link contains samples. I would recommend using CIM viewer for questions related to layer symbology. Change something in ArcGIS Pro layer symbology and find changed part in CIM objects tree of CIM Viewer. Download CIM Viewer code from here. Video about CIM Viewer here.
... View more
01-28-2025
05:38 AM
|
1
|
0
|
920
|
|
POST
|
Hi, Your code works fine. There are some reasons why you can't create featureclass within geodatabase: 1. analysis.Path ends with "\". I would recommend to use Path.Combine method to construct full path. 2. Your geodatabase already contains "NewLayer" featureclass. I would recommend to use ExecuteToolAsync method with GPToolExecuteEventHandler parameter as in API reference sample. It will show issues with input parameters. System.Threading.CancellationTokenSource _cts;
string ozone_points = @"C:\data\ca_ozone.gdb\O3_Sep06_3pm";
string[] args = { ozone_points, "OZONE", "", "in_memory\\raster", "300",
"EMPIRICAL", "300", "5", "5000",
"NBRTYPE=StandardCircular RADIUS=310833.272442914 ANGLE=0 NBR_MAX=10 SECTOR_TYPE=ONE_SECTOR",
"PREDICTION", "0.5", "EXCEED", "", "K_BESSEL" };
string tool_path = "ga.EmpiricalBayesianKriging";
_cts = new System.Threading.CancellationTokenSource();
var result = await Geoprocessing.ExecuteToolAsync(tool_path, args, null, _cts.Token,
(event_name, o) => // implement delegate and handle events
{
switch (event_name)
{
case "OnValidate": // stop execute if any warnings
if ((o as IGPMessage[]).Any(it => it.Type == GPMessageType.Warning))
_cts.Cancel();
break;
case "OnProgressMessage":
string msg = string.Format("{0}: {1}", new object[] { event_name, (string)o });
System.Windows.MessageBox.Show(msg);
_cts.Cancel();
break;
case "OnProgressPos":
string msg2 = string.Format("{0}: {1} %", new object[] { event_name, (int)o });
System.Windows.MessageBox.Show(msg2);
_cts.Cancel();
break;
}
});
var ret = result;
_cts = null;
... View more
01-25-2025
11:18 AM
|
0
|
0
|
1003
|
|
POST
|
Hi, You can open "New WEB layer" using ID (esri_sharing_SharingAsWEBLayerCXMUBtn) var commandId = "esri_sharing_SharingAsWEBLayerCXMUBtn";
IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper(commandId);
var command = wrapper as ICommand;
if ((command != null) && command.CanExecute(null))
command.Execute(null); Another way is to open geoprocessing tool dialog using Geoprocessing.OpenToolDialog
... View more
01-20-2025
10:57 PM
|
0
|
3
|
1303
|
|
POST
|
Hi, You can use Alter Field geoprocessing tool: Alter Field (Data Management)—ArcGIS Pro | Documentation How to call geoprocessing tool here: ExecuteToolAsync(String,IEnumerable<String>,IEnumerable<KeyValuePair<String,String>>,CancelableProgressor,GPExecuteToolFlags) Method—ArcGIS Pro
... View more
01-20-2025
10:39 PM
|
1
|
1
|
1887
|
|
POST
|
Sorry. it was commented out in daml. Maybe it was implemented in earlier versions. To handle cursor in stereo mapping you need to use keyboard key '~'. Tilde (~) Temporarily turn off fixed pointer mode. This turns off the fixed pointer mode to allow you to perform other tasks. To return to the fixed pointer mode, press the Tilde key again. Note: There is no need to press the Shift key. This shortcut applies to United States standard keyboards. Other types of keyboards may have a different character on the key. For detailed information, verify which key the VK_OEM_3 (Microsoft virtual key code) is mapped to for your keyboard. So, you can try to simulate keyboard pressing. Stereo map—ArcGIS Pro | Documentation
... View more
01-08-2025
01:05 AM
|
1
|
0
|
1365
|
|
POST
|
Hi, Try "esri_datasourcesraster_stereoCursorModeFixed". Module id="esri_datasourcesraster".
... View more
01-07-2025
06:05 AM
|
0
|
0
|
1378
|
|
POST
|
Hi, I think you can use logic from that thread. Instead of Distance you can check minimum difference in time between points. You can get both value (time and distance) on the same cycle. Here is how to obtain the difference in time.
... View more
01-02-2025
06:08 AM
|
1
|
0
|
2091
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 04-24-2026 08:33 AM | |
| 1 | 03-23-2026 11:44 AM | |
| 1 | 05-22-2024 11:48 PM | |
| 1 | 02-27-2026 10:33 AM | |
| 1 | 01-07-2026 10:44 AM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|