|
POST
|
Hi Adam, Look here: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Framework#set-the-current-tool
... View more
02-15-2021
12:56 PM
|
0
|
4
|
3914
|
|
POST
|
Hi, I have had the same situation but not with zoom. Esri stuff recommended to divide process inside QueuedTask.Run. I have a mind what it is a cache problem. Now if something does not work I try to divide one QueuedTask.Run to few if it possible.
... View more
02-10-2021
10:18 PM
|
2
|
1
|
2454
|
|
POST
|
WhereClause = "OBJECTID IN (1, 2, ....)" or best way to use .ObjectIDs property of QueryFilter .ObjectIDs = oids // Where oids is List<long>
... View more
02-09-2021
11:10 PM
|
2
|
1
|
3858
|
|
POST
|
Hi, Select must be called on the MCT. Use QueuedTask.Run: await QueuedTask.Run(() => { QueryFilter queryFilter = new QueryFilter { WhereClause = "OBJECTID = 12227" }; featureLayer.Select(queryFilter); });
... View more
02-09-2021
10:24 PM
|
1
|
3
|
3863
|
|
POST
|
Hi, Here is your problem: pQueryFilter.WhereClause = "HEI1 in (select HEI1 from EXTRA.House where number = 2502163)" You need to add to WhereClause only where section of your query: pQueryFilter.WhereClause = "number = 2502163"
... View more
01-22-2021
09:25 AM
|
0
|
0
|
1614
|
|
POST
|
Hi Christian, I would suggest you to use ProjectClosingEvent. On initializing call : ProjectClosingEvent.Subscribe(OnProjectClosing); Body of OnProjectClosing: private Task OnProjectClosing(ProjectClosingEventArgs args) { // if already cancelled, ignore if (args.Cancel) return Task.CompletedTask; // Do your tasks //var vm = FrameworkApplication.DockPaneManager.Find(_dockPaneID); //if (vm != null) vm.Hide(); return Task.CompletedTask; }
... View more
01-11-2021
05:59 AM
|
1
|
1
|
1758
|
|
POST
|
In MVVM you need to override Docpane's OnActivate or InitializeAsync to fill your observable collection like this: protected override void OnActivate(bool isActive) { base.OnActivate(isActive); if (isActive) { // Place here your observable collection initialization if it depends on map situation or etc. } } protected override async Task InitializeAsync() { await base.InitializeAsync(); // Place here your observable collection initialization if it needs one time creation }
... View more
12-03-2020
05:59 AM
|
1
|
0
|
784
|
|
POST
|
Hi Daniel, Look here maybe it helps: https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-show-the-quot-loading-animation-quot-using-arcgis-pro/td-p/838948
... View more
12-02-2020
10:26 PM
|
0
|
2
|
2890
|
|
POST
|
Hi, You can use MVVM only in that cases where Esri UI elements need it ( Dockpanes, PropertyPages and etc.) All other functionality you can code without MVVM. You can use and windows forms but they look different. About ListBox_Initialized. Sorry, I have never used this event and I don't know case where it would be needed.
... View more
12-02-2020
10:13 PM
|
0
|
2
|
7534
|
|
POST
|
Hi, It is long discussion about about MVVM, pure MVVM and etc, You can find more information on web. In pure MVVM xxx..xaml.cs should contain only code for setting a page's data context. Dockpane.xaml and Dockpane.xaml.cs both comprise View in MVVM? To simplify things I could say "Yes" If I need to do any changes on the observable collection, I should do it in DockpaneViewModel.cs, right? Yes. Your observable collection must contain items which implement INotifyPropertyChanged. To get selection you need to bind SelectItem to view model property and etc. As I said in previous reply all what you need to do is edit Dockpane.xaml using designer and code in DockpaneViewModel.cs . Remember about Dockpane.xaml.cs only when you want to rename your classes. More info on youtube ArcGIS Pro SDK for .NET: UI Design and MVVM: https://www.youtube.com/watch?v=5PgaeZycWXc
... View more
12-02-2020
07:24 AM
|
0
|
4
|
7540
|
|
POST
|
Hi, In MVVM you do not need to access xaml controls from View class (.xaml.cs) except some special cases. To do that you need to assign name to control in xaml with "x:Name". I would recommend to open one of Esri samples from github with Dockpane and study with debugger how it works. https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/master/Framework/DockpaneSimple https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/DockPaneBookmarkAdvanced More about dockpanes: https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-Dockpanes
... View more
12-01-2020
11:06 AM
|
1
|
6
|
7554
|
|
POST
|
Hi Derek, If your lyr/ lyrx file contains path to your file gdb feature class then you need just to add lyr/lyrx file to map, otherwise you need to change your existing code like this: await QueuedTask.Run(() => { // add lyr/lyrx to map var featureLayer = (FeatureLayer)LayerFactory.Instance.CreateLayer(new Uri(lyrFilePath), MapView.Active.Map, 0, "Counties"); CIMDataConnection currentDataConnection = featureLayer.GetDataConnection(); CIMStandardDataConnection updatedDataConnection = null; WorkspaceFactory wf = WorkspaceFactory.FileGDB; var dbGdbConnection = new FileGeodatabaseConnectionPath(new Uri(@"U:\environmental\envgist.gdb"), UriKind.Absolute)); // provide a replace data connection method updatedDataConnection = new CIMStandardDataConnection() { WorkspaceConnectionString = new Geodatabase(dbGdbConnection).GetConnectionString(), WorkspaceFactory = wf, Dataset = "counties", DatasetType = esriDatasetType.esriDTFeatureClass }; featureLayer.SetDataConnection(updatedDataConnection); featureLayer.ClearDisplayCache(); });
... View more
11-17-2020
10:12 PM
|
0
|
1
|
2049
|
|
POST
|
Hi, You can use geoprocessing function ApplySymbologyFromLayer_management. More info about some details and code you can found here: https://community.esri.com/t5/arcgis-pro-sdk-questions/applysymbologyfromlayer-geoprocessing-tool/m-p/778081#M966 https://community.esri.com/t5/arcgis-pro-sdk-questions/building-proper-syntax-for-importing-lyr-symbology-for-feature/m-p/817600#M2662 Another way is to create layer from lyrx file and change data connection (CIMDataConnection) to you featureclass source. You can find in Esri Pro samples.
... View more
11-16-2020
11:47 PM
|
0
|
3
|
2061
|
|
POST
|
Hi, You can create new Dockpane from Visual Studio ArcGIS templates and you will see how Dockpane headers are binded. Main header is specified in config.daml file as 'caption' value: <dockPane id="MyDockpaneID" caption="My Dockpane". Second one header binding property will be created in dockpane mvvm file: /// <summary> /// Text shown near the top of the DockPane. /// </summary> private string _heading = "MyFavoritTab"; public string Heading { get { return _heading; } set { SetProperty(ref _heading, value, () => Heading); } } In xaml: <DockPanel Grid.Row="0" LastChildFill="true" KeyboardNavigation.TabNavigation="Local" Height="30"> <TextBlock Grid.Column="1" Text="{Binding Heading}" Style="{DynamicResource Esri_TextBlockDockPaneHeader}">
... View more
11-13-2020
12:52 AM
|
0
|
9
|
7615
|
|
POST
|
Hi, I have asked similar question here: https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-net-developers-get-api-reference-for-all-geoprocessing/m-p/860250#M4707 The right name of your call must be 'ZonalStatisticsAsTable_sa', so they just fixed "bug"
... View more
11-13-2020
12:40 AM
|
0
|
0
|
1007
|
| 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
|