|
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
|
4429
|
|
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
|
1926
|
|
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
|
1926
|
|
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
|
1991
|
|
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
|
3
|
0
|
3116
|
|
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
|
3190
|
|
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
|
2702
|
|
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
|
3526
|
|
POST
|
Hello Than, I had already tried the solution with the temporary variable, but this doesn't work. I think that I already use the second solution, but I am not sure. Here is my code. There is probably something wrong with it: var items = new ObservableCollection<string>();
_streetItems= new ReadOnlyObservableCollection<string>(items);
object lockObject = new object();
BindingOperations.EnableCollectionSynchronization(_streetItems, lockObject);
var codedValuePairs = await GetCodedValuePairsFromDomainAsync(layerName, fieldName);
foreach (var keyValuePair in codedValuePairs)
{
items.Add(keyValuePair.Value);
}
public static async Task<SortedList<object, string>> GetCodeValuePairsFromDomainAsync(string featLayerName, string fieldName)
{
Domain domain = await GetDomainByFeatureLayerAsync(featLayerName, fieldName);
CodedValueDomain codedValueDomain = (CodedValueDomain)domain;
SortedList<object, string> codedValuePairs = await QueuedTask.Run(() =>
{
return codedValueDomain.GetCodedValuePairs();
});
return codedValuePairs;
}
public static async Task<Domain> GetDomainByFeatureLayerAsync(string featLayerName, string fieldName)
{
Domain domain = await QueuedTask.Run(() =>
{
var featLayer = LayerUtils.GetFeatureLayerByName(featLayerName);
var featClass = featLayer.GetFeatureClass();
var featClassDef = featClass.GetDefinition();
int index = featClassDef.FindField(fieldName);
var field = featClassDef.GetFields().ElementAt<Field>(index);
return field.GetDomain();
});
return domain;
} I now use a workaround: I get the domain coded value pairs when the project starts and save them in global variables. I populate my combo boxes using these global variables later in the constructor of the ProWindow. This works. Thanks, Barbara
... View more
07-23-2020
04:12 AM
|
1
|
0
|
3526
|
|
POST
|
Narelle, no, the values in my 'codedValuePairs' variable for the second domain are not empty. Yes, the second domain is found successfully. Please see below for the entire code I use. Thanks, Barbara
... View more
07-23-2020
03:47 AM
|
0
|
0
|
3526
|
|
POST
|
Hello Matthew, thank you for your reply! For the map view, setting the map scale works as follows: MapView mapView = MapView.Active;
Camera camera = mapView.Camera;
camera.Scale = 5000;
mapView.ZoomToAsync(camera, TimeSpan.Zero); Barbara
... View more
07-23-2020
01:34 AM
|
3
|
1
|
3622
|
|
POST
|
On the following page ProConcepts Map Authoring · Esri/arcgis-pro-sdk Wiki · GitHub is stated that the Map object has a map scale property, but I cannot find this property. MapView.Active doesn't have a map scale property neither. So how can I get and set the map scale?
... View more
07-22-2020
03:33 AM
|
0
|
3
|
3696
|
|
POST
|
Hello Than Aung, thank you for your reply! I already use the MVVM pattern using a ViewModel class. Yes, you are right, adding items to the combo box is not inside the MCT thread, so I removed the following code: lock (lockObject)
{
...
} However, I need the following line of code because getting coded value pairs from domain is done inside the MCT thread: BindingOperations.EnableCollectionSynchronization(_streetItems, lockObject); Otherwise, the combo box remains empty. I still have the problem that I can only fill one combo box with the domain values. The other combo box (whether it is the first or the second) always remains empty.
... View more
07-22-2020
01:14 AM
|
0
|
4
|
3526
|
|
POST
|
I have a ProWindow with two combo boxes on it. The combo box items are retrieved from coded value domains. I followed the guidelines for thread safe data binding with WPF on ProConcepts Framework · Esri/arcgis-pro-sdk Wiki · GitHub (section Thread safe data binding with WPF). The data binding is as follows: public ReadOnlyObservableCollection<string> StreetItems
{
get { return _streetItems; }
}
public ReadOnlyObservableCollection<string> RiverItems
{
get { return _riverItems; }
} The code for filling the first combo box is as follows (the second combo box is filled accordingly): var items = new ObservableCollection<string>();
_streetItems= new ReadOnlyObservableCollection<string>(items);
object lockObject = new object();
BindingOperations.EnableCollectionSynchronization(_streetItems, lockObject);
var codedValuePairs = await GetCodedValuePairsFromDomainAsync(layerName, fieldName);
lock (lockObject)
{
foreach (var keyValuePair in codedValuePairs)
{
items.Add(keyValuePair.Value);
}
} The problem is that I can only fill one combo box with the domain values. The other combo box (whether it is the first or the second) always remains empty. What am I doing wrong?
... View more
07-21-2020
07:48 AM
|
0
|
8
|
3660
|
|
POST
|
Hello Narelle, this was my error, sorry about that. The two feature classes didn't have the same spatial reference. Barbara
... View more
07-20-2020
05:15 AM
|
0
|
0
|
1867
|
| Title | Kudos | Posted |
|---|---|---|
| 5 | 11-21-2024 12:58 AM | |
| 1 | 04-02-2020 03:48 AM | |
| 1 | 09-20-2020 02:31 AM | |
| 14 | 03-06-2024 02:24 AM | |
| 2 | 02-28-2024 05:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-10-2025
01:50 AM
|