|
POST
|
Hi, You also need to explicitly include logic in your app to request this permission at run-time. var status = await Permissions.CheckStatusAsync<Permissions.LocationWhenInUse>();
// Request location permission if not granted.
if (status != PermissionStatus.Granted)
{
status = await Permissions.RequestAsync<Permissions.LocationWhenInUse>();
}
... View more
02-17-2025
03:46 AM
|
0
|
2
|
1428
|
|
POST
|
Hi, You can use management.AddFields to add all fields in one call.
... View more
02-16-2025
10:31 PM
|
1
|
0
|
1107
|
|
POST
|
Hi, You can override OnToolMouseMove. How to do that you can find in Esri ArcGIS Pro SDK Community sample MagnifierWindow.
... View more
02-11-2025
04:59 AM
|
0
|
0
|
626
|
|
POST
|
Hi, Yes. It is possible. TableView has method Highlight. The table view must be showing the Selected Records view. How to get TableView from table name you can found in TableViewerTest from Esri ArcGIS Pro SDK Community samples. Code sample uses method OpenAndActivateTablePane fromTableViewerTest sample: protected override void OnClick()
{
var myTable = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().Where(fl => fl.Name.Equals("YourTableName")).FirstOrDefault()
?? throw new Exception(@"Can't find 'YourTableName' Layer");
var myTablePanes = Module1.OpenAndActivateTablePane(myTable);
if (myTablePanes.TablePane == null)
throw new Exception($@"Unable to activate {myTable.Name}");
TableView tableView = myTablePanes.TablePaneEx.TableView;
if (tableView == null) throw new Exception($@"Can't get TableView for {myTable.Name}");
if (tableView.IsReady && tableView.CanHighlight)
{
tableView.Highlight(237, true);
}
} You need to listen for MapSelectionChangedEvent, collect selected objects objectid's and store current selected objectid. Selection set and current objectid I would recommend store in Module properties.
... View more
02-07-2025
12:40 PM
|
1
|
0
|
950
|
|
POST
|
@MK13 Sorry. I am Esri distributor only. My situation is very similar to yours.
... View more
02-06-2025
10:11 PM
|
0
|
0
|
3049
|
|
POST
|
Hi, You could call geoprocessing tool management.AssignDomainToField directly from code. Samples are here. Another way is to use SchemaBuilder. More about SchemaBuilder is here.
... View more
02-04-2025
11:17 PM
|
0
|
0
|
636
|
|
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
|
2721
|
|
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
|
2736
|
|
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
|
2767
|
|
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
|
1680
|
|
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
|
2034
|
|
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
|
1707
|
|
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
|
977
|
|
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
|
1085
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 06-30-2026 10:14 PM | |
| 1 | 06-30-2026 01:43 PM | |
| 2 | 04-24-2026 08:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|