POST
|
I'm using the following code to change the data source of the stereo map, but it doesn't work: await QueuedTask.Run(async () =>
{
Map stereoMap = await ProjectUtils.GetStereoMapAsync();
CIMMap cimMap = stereoMap.GetDefinition();
var stereoProps = cimMap.StereoProperties;
WorkspaceFactory workspaceFactory = WorkspaceFactory.FileGDB;
var fileGdbConnPath = new FileGeodatabaseConnectionPath(new Uri(@"D:\Data\StartProject.gdb", UriKind.Absolute));
var workspaceConnectionString = new Geodatabase(fileGdbConnPath).GetConnectionString();
CIMStandardDataConnection mosaicDataConnection = new CIMStandardDataConnection()
{
WorkspaceConnectionString = workspaceConnectionString,
WorkspaceFactory = workspaceFactory,
Dataset = "MyMosaic",
DatasetType = esriDatasetType.esriDTMosaicDataset
};
stereoProps.StereoModelCollection = mosaicDataConnection;
cimMap.StereoProperties = stereoProps;
MapView.Active.Redraw(true);
}); Any help is appreciated, thank you!
... View more
09-13-2023
03:53 AM
|
0
|
4
|
813
|
POST
|
We are using ArcGIS Pro 2.9.5. I tried it with createOperation.ExecuteAsync() and it worked! Thank you.
... View more
12-31-2022
07:42 AM
|
0
|
0
|
443
|
POST
|
This is a bug, I guess. I implemented a workaround to automatically save my edits after 1 minute using System.Windows.Threading.DispatcherTimer
... View more
11-16-2022
06:10 AM
|
0
|
0
|
466
|
POST
|
In the Editing Options of a project, I choose to automatically save edits after 1 minute. If I create a new feature manually, it is automatically saved after 1 minute. However, if I create the feature programmatically, it is not automatically saved after 1 minute. To create the feature programmatically, I use a Construction Tool and the following code inside the method OnSketchCompleteAsync(): var createOperation = new EditOperation();
createOperation.Create(featLayer, attributes);
bool succeeded = await QueuedTask.Run(() =>
{
return createOperation.Execute();
}); Is there a way that the creation of my new feature is recognized by automatically save edits?
... View more
11-11-2022
07:09 AM
|
1
|
3
|
571
|
POST
|
I want to create a class breaks renderer (with manual intervals) for a raster layer: I have found a sample here: https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/master/Map-Authoring/Renderer/ClassBreakRenderers.cs (internal static Task CBGraduatedColorsManualBreaks()). This is exactly what I want, but for a feature layer. How can I achieve this for a raster layer? I haven't found anything. Thank you for your help in advance!
... View more
08-22-2022
03:47 AM
|
0
|
1
|
638
|
POST
|
Thank you for your tip using GDAL. We also work with feature classes within file geodatabases. We convert the feature classes to shapefiles each time an ArcGIS Pro project is closed, just to have a backup. It happened in the past that file geodatabases got messed up.
... View more
02-17-2022
12:55 AM
|
0
|
0
|
1045
|
POST
|
I am using the GP tool "conversion.FeatureClassToShapefile"
... View more
02-16-2022
09:19 AM
|
0
|
2
|
1072
|
POST
|
I am looking for a faster way to convert a feature class to a shapefile than the Geoprocessing API. Is it possible by using the DDL API? I haven't found anything.
... View more
02-16-2022
06:03 AM
|
0
|
9
|
1168
|
POST
|
I have found a workaround for this problem. When I make the TOC as small as possible (remove unused layers, collapse layers), the problem doesn't appear.
... View more
01-17-2022
07:16 AM
|
0
|
3
|
946
|
POST
|
In my ArcGIS Pro Add-In, when a project is started, I wait until drawing is complete using the OnDrawComplete event. I then access the map using MapView.Active.Map. But sometimes, the map is null. This only happens since I installed 2.9. In previous versions, this worked fine. I noticed that the TOC draws after the map drawing is complete. The map is null before the TOC drawing is complete.
... View more
01-06-2022
07:25 AM
|
0
|
9
|
1083
|
POST
|
Thank you Wolf. I made the wrong assumption. I thought that I can change the icon of the add-in file (.esriaddinx). But actually, I can only change the icon of the add-in in the Add-In Manager:
... View more
11-02-2021
01:49 AM
|
0
|
0
|
1479
|
POST
|
I want to change the icon of my add-in: To do this, I indicate my new image (Tree32.png) in the Config.daml: <AddInInfo id="{06b629d0-c299-4e09-9149-09bfbc3bd161}" version="0.0.16" desktopVersion="2.8">
<Name>WaldstrassenApp_V0.0.16</Name>
...
<Image>Images\Tree32.png</Image>
<Subject>Framework</Subject>
</AddInInfo> I also make sure to set the Build Action of "Tree32.png" to AddInContent. However, the icon of my add-in doesn't change.
... View more
11-01-2021
05:46 AM
|
0
|
2
|
1555
|
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
|
1726
|
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
|
1741
|
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
|
1777
|
Title | Kudos | Posted |
---|---|---|
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 | |
1 | 12-22-2023 04:37 AM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|