POST
|
Thank you Wolf. In the sample you mention, the view model class inherits from PropertyChangedBase: public class ProWindowDialogVM : PropertyChangedBase However, in order to change the enabled or checked property of a GUI component programmatically, the view model class has to implement INotifyPropertyChanged.
... View more
10-20-2021
01:01 AM
|
0
|
0
|
1807
|
POST
|
I found out what I missed: I have to specify that my view model class implements the interface INotifyPropertyChanged: public class WindowEducationPointsViewModel : INotifyPropertyChanged
... View more
10-19-2021
06:26 AM
|
1
|
0
|
1822
|
POST
|
I created a check box and a combo box in a ProWindow. In the xaml file, this is defined as follows: <CheckBox x:Name="checkBoxSchool" IsChecked="{Binding SchoolChecked}" Content="School"/>
<ComboBox x:Name="comboBoxSchool" ItemsSource="{Binding SchoolItems}" SelectedItem="{Binding SelectedSchoolItem}" IsEnabled="{Binding SchoolComboEnabled}"/> When the ProWindow is opened, the check box should be disabled. The code in the view model is: private void InitViewModel()
{
SchoolComboEnabled = false;
}
public bool SchoolComboEnabled
{
get { return _schoolComboEnabled; }
set
{
_schoolComboEnabled = value;
OnPropertyChanged();
}
}
protected void OnPropertyChanged([CallerMemberName] string name = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
} This works. When the user checks the check box, the combo box should become enabled: public bool SchoolChecked
{
get { return _schoolChecked; }
set
{
_schoolChecked= value;
if (_schoolChecked)
{
SchoolComboEnabled = true;
OnPropertyChanged();
}
}
} This doesn't work, i.e. the check box doesn't become enabled. I tried the exact same code in a dock pane, and it worked! The problem is that I need a window and not a dock pane. I also created a user control that is embedded in a ProWindow (see ReusableUserControl ) but this doesn't work neither. Any help is appreciated!
... View more
10-18-2021
04:48 AM
|
0
|
4
|
1858
|
POST
|
At the bottom of the map, there is a toolbar with a combo box to select the scale, with a button to set snapping, and more: Is it possible to customize this toolbar? E.g. I would like to remove the button to set snapping.
... View more
09-04-2021
01:14 AM
|
0
|
1
|
638
|
POST
|
I think what made the difference was deleting the following folder: C:\Users\schneidb\AppData\Roaming\ESRI\ArcGISPro.exe_StrongName_yhpsrysqpn4fvmb0spwbakt5o5e50din It contains the file "user.config" for every former version of ArcGIS Pro.
... View more
11-04-2020
07:47 AM
|
2
|
1
|
2992
|
POST
|
Hello Dan, thanks for your reply. Your answer inspired me to log on as administrator to my computer and try to work in ArcGIS Pro. It worked! I then compared the following folders of the administrator and of my account and cleaned up everything that was not there in the administrator folders: C:\Users\schneidb\Documents\ArcGIS C:\Users\schneidb\AppData\Local\ESRI\ArcGISPro C:\Users\schneidb\AppData\Roaming\ESRI Now, when I log in to my computer with my account, ArcGIS Pro works again!
... View more
11-04-2020
06:58 AM
|
0
|
2
|
2992
|
POST
|
This happens with every project. For example, I just created a new project, added a empty map (without basemap) and added a new folder connection. Then I tried to save ---> ArcGIS Pro freezes.
... View more
11-04-2020
12:58 AM
|
0
|
1
|
2992
|
POST
|
I have just migrated from ArcGIS Pro 2.5 to ArcGIS Pro 2.6.2. The program freezes when I try to: - save the project - add a map frame to the layout - add a new map to the project - and more I have checked the following post: ArcGIS Pro Projects Hanging I reinstalled ArcGIS Pro and ran the System File Checker, but this didn't help. I have also checked the following post: ArcGIS Pro freezes when I add a map, or open a project that has a map already I cleared the display cache and this didn't help either. I then ran the diagnostic tool ArcMon. It indicates that the system freezes at ArcGIS.Desktop.Mapping.MappingModule.GetMapsDisplayUnits when the project is saved. Any help is appreciated!
... View more
11-03-2020
07:27 AM
|
0
|
8
|
3073
|
POST
|
I could also search the feature class instead of the layer and add the layer's definition query to the SpatialQueryFilter: SpatialQueryFilter spQueryFilter = new SpatialQueryFilter()
{
WhereClause = featLayer.DefinitionQuery,
FilterGeometry = point,
SpatialRelationship = SpatialRelationship.Intersects,
};
using (RowCursor rowCursor = featLayer.GetFeatureClass().Search(spQueryFilter,false))
... View more
09-20-2020
07:26 AM
|
0
|
2
|
1105
|
POST
|
Hi Rich, this makes sense, thank you. However, the Search method on the feature layer doesn't have a parameter for the recycling option, only the Search method on the feature class. I have to search the feature layer because I take into consideration its definition query. Is there a way to search the feature layer with the recycling option set to false? I guess I just have to use the workaround I've described above. Barbara
... View more
09-20-2020
02:31 AM
|
1
|
0
|
1105
|
POST
|
I have a function that calls another (static) function which returns a list of features: private Feature GetNextFeature(FeatureLayer featLayer, MapPoint point)
{
await QueuedTask.Run(() =>
{
var featList = Utils.GetFeaturesThatIntersectPoint(point, featLayer);
// Do some more with the feature list
....
});
} public static List<Feature> GetFeaturesThatIntersectPoint(MapPoint point, FeatureLayer featLayer)
{
List<Feature> featList = new List<Feature>();
// Create spatial query filter
SpatialQueryFilter spatialFilter = new SpatialQueryFilter()
{
FilterGeometry = point,
SpatialRelationship = SpatialRelationship.Intersects,
};
// Query the feature layer
using (RowCursor rowCursor = featLayer.Search(spatialFilter))
{
while (rowCursor.MoveNext())
{
Row row = rowCursor.Current;
featList.Add((Feature)row);
}
}
return featList;
} In the method "GetFeaturesThatIntersectPoint", the feature list is correct. However, in the calling function "GetNextFeature", the features in the list are not the same any more. What am I doing wrong? As a workaround, I don't return a list of features, but a list of oids (of the features). This list is correct.
... View more
09-18-2020
03:52 AM
|
0
|
5
|
1170
|
POST
|
I have the same question as Leslie. I want my dockpane to be closed when the project is opened. I solved this problem by closing the dockpane when ArcGIS Pro is shut down. I use the following code in my module: protected override bool CanUnload()
{
DockPane dockPane = FrameworkApplication.DockPaneManager.Find(_myDockPaneID);
if (dockPane != null)
{
dockPane.IsVisible = false;
}
return true;
}
... View more
08-28-2020
04:28 AM
|
2
|
0
|
1934
|
IDEA
|
At the Swiss Federal Institute for Forest, Snow and Landscape Research, we have four full time stereo interpreters that use four stereo interpretation applications running with ArcMap and Erdas Stereo Analyst. In order to migrate our applications to ArcGIS Pro, it is important that creating feature classes, geodatabase domains (including domain values), and geodatabase topology is fast. At the moment it is slow because Geoprocessing Tools are used for each step. In our applications, the interpreters work at a sample plot for about 10 minutes and then go to the next one. Each time a sample plot is opened, the feature classes, geodatabase domains, and geodatabase topology are created from scratch programmatically. This is much less error-prone than using pre-created feature classes.
... View more
08-19-2020
01:43 AM
|
0
|
0
|
2275
|
IDEA
|
At the Swiss Federal Institute for Forest, Snow, and Landscape Research, we have four full time stereo interpreters. For them, it is very important to work with the Stealth Mouse (model S4-Z) for the following reasons: Ergonomics: as our stereo interpreters use the Stealth Mouse the whole day, they are glad that they can use both hands. E.g. they can use the left or the right hand to roll the mouse wheel. Performance: the number of clicks can be reduced. Furthermore, the interpreters don't have to select a new tool for each new task on a toolbar. The tools and commands are assigned to Stealth Mouse buttons. For the second point, I can give a workflow example as we do it in Stereo Analyst (with ArcMap 10.7.1) at the moment: 1. Zoom in to area of interest 2. Cut a polygon 3. Autocomplete a polygon With the system mouse, the workflow above is as follows: 1. Select ZoomIn Tool on toolbar and click on map 2. Select Edit Tool on toolbar and select feature. Select "Cut Polygons" Tool and cut polygon 3. Select "Autocomplete Polygon" tool from "Construction Tools" window and autocomplete polygon With the Stealth Mouse, 4 clicks less are necessary for above workflow because no tool has to be selected on a toolbar: 1. Click on a Stealth Mouse button to zoom in --> 1 click less 2. Select feature by clicking on a Stealth Mouse button. Cut polygon using another Stealth Mouse button --> 2 clicks less 3. Autocomplete polygon using another Stealth Mouse button --> 1 click less In order to migrate to ArcGIS Pro and Image Analyst, it is essential that the Stealth Mouse is supported.
... View more
08-19-2020
01:22 AM
|
10
|
3
|
1784
|
POST
|
I found out what the problem is. In the constructor of my view model, I call the two functions to fill my combo boxes: await FillStreetComboboxAsync();
await FillRiverComboboxAsync(); If I remove the "await", my two combo boxes get filled. FillStreetComboboxAsync();
FillRiverComboboxAsync(); Here is the method FillStreetComboboxAsync(): private async void FillStreetComboboxAsync()
{
var items = new ObservableCollection<string>();
_streetItems = new ReadOnlyObservableCollection<string>(items);
object lockObject = new object();
BindingOperations.EnableCollectionSynchronization(_streetItems , lockObject);
var codeValuePairs = await GetCodeValuePairsFromDomainAsync(_layerName, _fieldName);
foreach (var keyValuePair in codeValuePairs)
{
items.Add(keyValuePair.Value);
}
} Method fill RiverComboboxAsync() is analogous.
... View more
07-24-2020
02:32 AM
|
0
|
0
|
2098
|
Title | Kudos | Posted |
---|---|---|
1 | 04-02-2020 03:48 AM | |
1 | 09-20-2020 02:31 AM | |
12 | 03-06-2024 02:24 AM | |
2 | 02-28-2024 05:37 AM | |
1 | 01-08-2024 05:13 AM |
Online Status |
Offline
|
Date Last Visited |
Thursday
|