|
POST
|
Hi Thomas, It is not enough for your property declaring. You need to do like that: private string _urlDHM; public string UrlDHM { get { return _urlDHM; } set { SetProperty(ref _urlDHM, value, () => UrlDHM); } } You need to notify view that something was changed in the model.
... View more
11-07-2019
12:41 AM
|
0
|
4
|
3372
|
|
POST
|
Hi Thomas, What do you mean "settings file"? ArcGIS Pro project settings or your own custom settings file? If it is ArcGIS Pro project settings then you need to follow example on GitHub from ArcGIS Pro. Else you need to and read settings file and set your setting parameters to corresponding page properties binded to xaml controls. All properties must be public. All code stuff you need to put in to: protected override Task InitializeAsync() { }
... View more
11-06-2019
10:24 PM
|
0
|
6
|
3372
|
|
POST
|
Hi Oscar, You do not need any code snippet. Just use Select method from FeatureLayer. Like that: featLayer.Select(qf); // your query filter
... View more
11-05-2019
01:15 AM
|
4
|
1
|
4505
|
|
POST
|
Hi Jaewon, In the ribbon toolbar where your tools located you can add combobox control with 2 records: Excavation and Tunnelling. On selection changed of combobox you can change state of tools (enable/disable). Enabling/disabling you can manage with button or tool condition parameter defined in config.daml and FrameworkApplication.State.Activate method. To get sample check ArcGIS Pro SDk samples for FrameworkApplication.State.Activate method.
... View more
10-23-2019
11:40 PM
|
0
|
1
|
1943
|
|
POST
|
Hi David, That question is more about wpf developing then ArcGIS Pro API. If you use some framework (Prism or etc.) for developing wpf application so can check your framework for solution you need. If you use plane wpf as I do then you can use messaging: https://stackoverflow.com/questions/23798425/wpf-mvvm-communication-between-view-model I use it in my projects to communicate between pages, pages and parent of pages and etc.
... View more
10-23-2019
11:27 PM
|
0
|
0
|
4945
|
|
POST
|
Hi Sean, Sorry. It was my fault. I have separated EditOperation Callback from our application and find that it works fine. After that I have found the problem source. Next step saves it changes (and all made before) without prompting to save edits. Thanks
... View more
10-18-2019
12:59 AM
|
0
|
0
|
1042
|
|
POST
|
Hi, I try to execute some filegeodatabase changes in one EditOperation Callback. Changes are made in one table and some records searched by query. Callback works fine. Changes are made, but there is no undo operation in undo/redo stack. I have tried to set EditOperationType to Long but without success. Is it bug or feature?
... View more
10-17-2019
07:22 AM
|
0
|
2
|
1084
|
|
POST
|
Hi Naresh, Try at first Esri sample with dockpane. If sample does not work on VM then write ticket to esri support. Else check all libraries included in your dockpane xaml. We all libraries which use more than one Add-in add to GAC, all Add-ins put to special folder defined in ArcGIS Pro Add-ins manager.
... View more
10-16-2019
02:40 AM
|
0
|
0
|
1632
|
|
POST
|
Hi Sam, Try code below. FilePath is your raster path in geodatabase. Instead of creating layer you can do what you want private Task AddToMap() { return QueuedTask.Run(() => { try { // first we create an 'Item' using itemfactory Item currentItem = ItemFactory.Instance.Create(FilePath); // Finally add the feature service to the map // if we have an item that can be turned into a layer // add it to the map if (LayerFactory.Instance.CanCreateLayerFrom(currentItem)) LayerFactory.Instance.CreateLayer(currentItem, MapView.Active.Map); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error while adding vector tile to map"); } }); }
... View more
10-01-2019
10:31 PM
|
0
|
1
|
1318
|
|
POST
|
Hi Susan, I am not really sure that DeleteFields tool exists. DeleteField - yes. Try delete one by one field at first. Next question is the structure of your FieldNames variable. If you use the same FieldNames variable for delete then it will not work, because for adding field you need more than just field name (type, length and etc.). For deleting it is enough only field name. I have just tested arcpy script where y and x is table field names: arcpy.management.DeleteField('mytable', "y;x") It works fine
... View more
09-25-2019
11:56 PM
|
0
|
0
|
1085
|
|
POST
|
Hi Sam, For raster layers: // Working with rasters requires the MCT. await QueuedTask.Run(() => { // Get the raster from the current selected raster layer. Raster inputRaster = currentRasterLayer.GetRaster(); var spatRef= inputRaster.GetSpatialReference(); }); For feature layers: // Working with rasters requires the MCT. await QueuedTask.Run(() => { // get the feature class associated with the layer var featureClass = pointFeatureLayer.GetTable() as FeatureClass; // retrieve the class definition of the point feature class var classDefinition = featureClass.GetDefinition() as FeatureClassDefinition; // store the spatial reference as its own variable var spatialReference = classDefinition.GetSpatialReference(); });
... View more
09-19-2019
04:13 AM
|
2
|
1
|
2152
|
|
POST
|
David you can manage order of loading Add-ins. So you can make that module which responsible for project settings and licensing will be loaded first. I have the same situation in my development project: project settings and licensing. I call it core module. In the config.daml file of core module add to module attribute autoLoad="true". For other Add-ins modules add dependencies from core module like this: <dependencies> <!-- id of "core module" --> <dependency name="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx}" /> </dependencies> There is no timing issues or other problems reading project settings
... View more
09-16-2019
07:24 AM
|
1
|
2
|
2040
|
|
POST
|
Hi Anandha, To select features from particular layer set Tool property UseSnapping to true. Then switch off snapping on all map layers except layer you need. In sample all snappable layers are separated by ";" in the input string. public static async Task ConfigureSnappingAsync(string sLayerNames) { // General Snapping Snapping.IsEnabled = true; Snapping.SetSnapMode(SnapMode.Point, true); // Snapping on any point Feature Layers var flayers = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().ToList(); if (flayers.Count() > 0) { //GetDefinition and SetDefinition must be called inside QueuedTask await QueuedTask.Run(() => { string sNames = string.Empty; if (!string.IsNullOrEmpty(sLayerNames)) { sNames = sLayerNames.ToUpper(); } foreach (var fl in flayers) { var layerDef = fl.GetDefinition() as CIMGeoFeatureLayerBase; if (string.IsNullOrEmpty(sNames)) { if (!layerDef.Snappable) { layerDef.Snappable = true; fl.SetDefinition(layerDef); } } else { string searchName = fl.Name.ToUpper() + ";"; layerDef.Snappable = sNames.Contains(searchName); fl.SetDefinition(layerDef); } } }); } } The next step is more complicated. There are two ways: 1. Control mouse cursor (set direction you want) 2. Change cursor icon on mouse move then user selects wrong direction and do not accept wrong position on mouse down.
... View more
09-15-2019
11:27 PM
|
0
|
0
|
884
|
|
POST
|
Hi David, I have similar task and I need settings all time of work with ArcGIS Pro. So I create singleton class with Dictionary type property. On OnReadSettingsAsync() I copy all my project settings to singleton. When I need project settings, I call singleton class for getting value I need. You can use your module class for this if your all Add-ins are in the same module. In other case you can get many cross-references.
... View more
09-15-2019
11:10 PM
|
2
|
4
|
2040
|
|
POST
|
Hi Serban, I do it in that way. My ProWindow Class: public partial class TestWindow : ProWindow Creating new window: var testWindow = new TestWindow(); testWindow.Owner = FrameworkApplication.Current.MainWindow; testWindow.ShowDialog();
... View more
09-09-2019
02:07 AM
|
1
|
0
|
982
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 2 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
|