|
POST
|
Hi Abel, SaveItemDialog is GUI element so you should not use QueuedTask with SaveItemDialog. You need to end QueuedTask before calling SaveItemDialog and start new QueuedTask after SaveItemDialog return (if you need). All methods that needs QueuedTask are marked by Intellisense as "This method must be called on MCT....".
... View more
05-07-2020
11:20 PM
|
1
|
1
|
1547
|
|
POST
|
I have attached bundle of ProjectSettingsView mvvm code of BackStage_PropertyPage sample from Esri ArcGIS Pro samples. It works
... View more
05-07-2020
10:58 PM
|
1
|
2
|
5474
|
|
POST
|
Hi Abel, You need to implement IDataErrorInfo to your viewmodel internal class ProjectSettingsViewModel : Page, IDataErrorInfo. More info here: https://codeblitz.wordpress.com/2009/05/08/wpf-validation-made-easy-with-idataerrorinfo/ You just need to modify content of public string this[string columnName] to store each control state and set base.IsValid value.
... View more
05-06-2020
10:47 PM
|
0
|
4
|
4027
|
|
POST
|
You can disable OK button by setting Page IsValid property, like this: base.IsValid = false;
... View more
05-06-2020
07:32 AM
|
1
|
9
|
4027
|
|
POST
|
Hi Mody, I would use DataGrid in your case. I have similar situation with my workspace properties. Each property has simple value or value you can choose from combobox. Each combobox has different sets of available values. What you need is a list of custom objects with layer and other properties inside. Other things will do bindings. You can use DataGridComboBoxColumn for columns for comboboxes or make your own template for column. My implementation of DataGrid:
... View more
05-06-2020
03:06 AM
|
0
|
2
|
2021
|
|
POST
|
Hi Abel, This is the WPF stuff. Look here: https://docs.microsoft.com/en-us/dotnet/framework/wpf/data/how-to-implement-binding-validation
... View more
05-06-2020
02:41 AM
|
1
|
11
|
4027
|
|
POST
|
Hi Daniel, As I see from your picture you have one line feature selected. Try select or unselect all features. Geoprocessing window checks for selection of inputs.
... View more
05-04-2020
11:15 PM
|
1
|
1
|
3097
|
|
POST
|
Hi Abel, To check feature class path for existing is very simple: Item currentItem = ItemFactory.Instance.Create(featureClassPath, ItemFactory.ItemType.PathItem); if (!LayerFactory.Instance.CanCreateLayerFrom(currentItem)) { // Invalid path } To determine if the feature class is a shapefile or a feature class in a geodb you need to check WorkspaceFactory value from CIMStandardDataConnection class or from layer: https://community.esri.com/message/920599-best-way-to-determine-the-full-path-of-a-featurelayer-if-it-is-a-shapefile To check spatial reference you need to try create it. Which method use to create you must decide yourself. https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Geometry
... View more
04-27-2020
01:07 AM
|
0
|
2
|
2123
|
|
POST
|
Hi Nobir, I am back to my suggestion. My application needs HillShade geoprocessing tool. Situation the same as with EucDistance tool. out_raster = arcpy.sa.HillShade("dsm", 315, 45, "SHADOWS", 1); Output raster parameter in second place for .Net API. How to find it? I have spent half a day. Empty error messages. After some time I found old good ArcGIS 9.3 page: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Hillshade and one line in the scope of page: # Process: Hillshade gp.Hillshade_sa(InRaster, OutRaster, InAzimuth, InAltitude) Another one note. When I execute from .Net Add-in geoprocessing tool with GPExecuteToolFlags.AddToHistory flag, if tool finishes successfully it adds it to history, otherwise -no. When you execute tool from ArcGIS Pro Geoprocessing pane it adds to history always. It would be useful to have the same functionality and from ArcGIS Pro API.
... View more
04-23-2020
11:29 PM
|
0
|
0
|
4382
|
|
BLOG
|
Hi Than, I had experience today with excel files and I found solution using ArcGIS Pro filters: var xlsxFilter = BrowseProjectFilter.GetFilter("esri_browseDialogFilters_browseFiles"); xlsxFilter.FileExtension = "*.xlsx;*.xls";//restrict to specific extensions as needed xlsxFilter.BrowsingFilesMode = true; //Specify a name to show in the filter dropdown combo box - otherwise the name will show as "Default" xlsxFilter.Name = "Excel Files (*.xlsx;*.xls)"; //Use the filter with the OpenItemDialog var dlg = new OpenItemDialog() { BrowseFilter = xlsxFilter, //or use defaultFilter or contentFilter... Title = "Select Satellites Table" }; //show the dialog and retrieve the selection if there was one if (!dlg.ShowDialog().Value) return; var item = dlg.Items.First(); txtXLSFile = item.Path; Another one solution is to use composite filters. To composite filter you can add one filter for xls, another one for xlsx or csv files. For folder browsing there is ArcGIS Pro filter: OpenItemDialog dlg = new OpenItemDialog { Title = sTitle, InitialLocation = initialLocation, AlwaysUseInitialLocation = true, MultiSelect = false, Filter = ItemFilters.folders }; if (!dlg.ShowDialog().Value) return; var item = dlg.Items.First(); txtFolderPath = item.Path;
... View more
04-22-2020
07:50 AM
|
2
|
0
|
2654
|
|
POST
|
HI James, More info about first option: ArcGIS Pro 2.5 API Reference Guide
... View more
04-10-2020
06:29 AM
|
0
|
1
|
5026
|
|
POST
|
Hi James, Have you tried like this: var parameters = Geoprocessing.MakeValueArray(fullSpec, fieldName); var cts = new CancellationTokenSource(); var results = Geoprocessing.ExecuteToolAsync("management.DeleteField", parameters, null, cts.Token, (eventName, o) => { System.Diagnostics.Debug.WriteLine($@"GP event: {eventName}"); if (eventName == "OnMessage") { System.Diagnostics.Debug.WriteLine($@"Msg: {o}"); } }); If you want to wait until your job finishes you can do like this: var parameters = Geoprocessing.MakeValueArray(sInputPath); var gpResult = Geoprocessing.ExecuteToolAsync("Delete_management", parameters, null, CancelableProgressor.None, GPExecuteToolFlags.None); gpResult.Wait(); return !gpResult.Result.IsFailed; Task.Wait Method (System.Threading.Tasks) | Microsoft Docs Or you can combine both.
... View more
04-09-2020
11:21 PM
|
0
|
4
|
5026
|
|
POST
|
Hi Than, For ArcGIS.Core.Geometry.SpatialReference you can use ToXML() method ang then deserialize result string to ProjectedCoordinateSystem or GeographicCoordinateSystem (depending on your spatial reference). Then take from coordinate system variable WKT property. For ArcGIS.core.Internal.CIM.SpatialReference you can just take wkt property. WKT parser you can find on internet. First what I find : GitHub - Esri/ogc-crs-wkt-parser: Sample code to implement new OGC WKT specification
... View more
04-09-2020
12:38 AM
|
2
|
1
|
2032
|
|
POST
|
HI Than, You can parse them from json or xml string using SpatialReference methods ToXML() or ToJson()
... View more
04-08-2020
07:22 AM
|
0
|
3
|
2032
|
|
POST
|
Hi Gernot, You can assign row value to object type variable. Then check if it is null. If not - assing it to timestamp variable as in your code. Another way is to use Convert.ToDateTime like this: DateTime timestamp = Convert.ToDateTime(row["Timestamp"]);
... View more
04-08-2020
07:10 AM
|
0
|
1
|
2142
|
| 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 |
Thursday
|