|
POST
|
Thanks, but I am not interested in a Taco Bell survey 😄 Chance you pasted the wrong link in?
... View more
03-14-2022
05:33 AM
|
0
|
1
|
2153
|
|
POST
|
I have a couple of layers from our portal that populate a ListBox in my AddIn. Data in our portal are available as Map Image Layer and as Feature Layer, and to give the user an easy way to distinguish one from the other I would like to add the appropriate icon to each ListBoxItem. However, I cannot find the icons listed at https://github.com/Esri/arcgis-pro-sdk/wiki/DAML-ID-Reference-Icons. The icons in question are these: Can somebody tell me there reference names?
... View more
03-14-2022
03:20 AM
|
0
|
2
|
1205
|
|
POST
|
I publish a list of objects in a ListBox and hoped to bind the selection of an item to a boolean property. <ListBox x:Name="DataLayerList" SelectionMode="Extended" IsTextSearchEnabled="True" ItemsSource="{Binding LayersFiltered, Mode=OneWay}">
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="IsSelected" Value="{Binding ListItemSelected, Mode=TwoWay}"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox> LayersFiltered is a list of ThemeLayer, where Theme layer is defined as such. public class ThemeLayer
{
public readonly string Name;
public readonly string Id;
public readonly string Type;
public override string ToString()
{
return Name;
}
public ThemeLayer(string name, string id, string type)
{
Name = name;
Id = id;
Type = type;
}
public bool IsSelected { get; set; }
} Within my ViewModel LayersFiltered and ListItemSelected are defined as: private List<ThemeLayer> _layersFiltered;
public List<ThemeLayer> LayersFiltered
{
get => _layersFiltered;
set => SetProperty(ref _layersFiltered, value, () => LayersFiltered);
}
private bool _listItemSelected;
public bool ListItemSelected
{
get => _listItemSelected;
set
{
SetProperty(ref _listItemSelected, value, () => ListItemSelected);
}
} However, ListItemSelected is never triggered when I select a ListBoxItem. I had a look at https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/44183d0d5a9bc5da6fb8b9229211cc707dd2b874/Framework/RemoveAddins/SampleBackstageTabView.xaml but fail to transfer it into my code.
... View more
03-14-2022
02:45 AM
|
0
|
6
|
2170
|
|
POST
|
Hi Narelle, about the QueryLayer, I do not display the entire data of the oracle table, but have a where clause in. SELECT * FROM SCHEMA1.TABLE1 WHERE FEATURETYPE = 'turbine' AND EXISTS (SELECT 1 FROM SCHEMA2.TABLE2 v WHERE v.LOCALID = TO_CHAR(OTLOCALID) AND TRUNC(v.REGISTRATIONFROM, 'MI') = TRUNC(TO_TIMESTAMP_TZ(TO_CHAR(FROM_TZ(CAST(OTREGISTRETIONFROM AS TIMESTAMP), 'Europe/Copenhagen'),'YYYY-MM-DD HH24:MI:SS,ff6 TZH:TZM'),'YYYY-MM-DD HH24:MI:SS,ff6 TZH:TZM'), 'MI')) ORDER BY OBJECTID I set the unique identifier through queryDescription.SetObjectIDFields("OBJECTID"); Our current version of Oracle is Oracle Database 18c EE Extreme Perf Release 18.0.0.0.0 - Production Version 18.10.0.0.0 and yes, we had changes in our infrastructure. I only touched the add-in because the location of the Oracle server changed in connection with an upgrade from version 12.1.0.1.0, and since then the add-in goes haywire. Thomas
... View more
09-23-2021
01:54 AM
|
0
|
0
|
2141
|
|
POST
|
Hi Narelle, thanks for your fast reply. We are running ArcGIS Pro version: 2.8.1 and the addin is currently build with ArcGIS Pro SDK version: 2.8.0.29751. With respect to the data source, I display QueryLayer, data request goes to an Oracle database. The breakpoint is directly on line 3 in the SelectedRowForStepper method. Hence, I believe I am looking at the TableControl object that should hold the information visualized in the UI. Thank you so much for looking deeper into things. Bests Thomas
... View more
09-22-2021
05:31 AM
|
0
|
2
|
2150
|
|
POST
|
In my addin I visualize the attribute values of a feature layer in a TableControl. Until recently the whole setup worked fine, and for whatever reason does the addin not work any more correct. I can show the attribute values of the feature layer, but when I try to retrieve the selected row in the TableControl then nothing comes back. To utilize the TableControl I define the namespace in the xaml file: xmlns:editing="clr-namespace:ArcGIS.Desktop.Editing;assembly=ArcGIS.Desktop.Editing" and add the control: <editing:TableControl Grid.Row="2" x:Name="tableControl"
AutomationProperties.AutomationId="_tableControl"
HorizontalAlignment="Stretch"
TableContent="{Binding Path=TableContent}"
MinHeight="450"
MaxHeight="500"
RowContextMenu="{StaticResource StepperRowContextMenu}"
SelectedRowContextMenu="{StaticResource StepperRowContextMenu}"
ColumnContextMenu="{StaticResource StepperColumnContextMenu}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDoubleClick">
<i:InvokeCommandAction Command="{Binding ZoomItemCommand}"/>
</i:EventTrigger>
<i:EventTrigger EventName="SelectedRowsChanged">
<i:InvokeCommandAction Command="{Binding GetSelectedRowCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</editing:TableControl> I am getting an XDG0008 error from the component, saying the name "TableControl" does not exist in the namespace "clr-namespace:ArcGIS.Desktop.Editing;assembly=ArcGIS.Desktop.Editing". Even though it is claimed the component does not exist within the namespace, the component is shown in the addin, populated with data, and then when I change the selected row nothing happens. Every time the selected row is changed I ask the TableControl to return the selected row indexes: public async Task SelectedRowForStepper()
{
IReadOnlyList<long> curSelectedRowList = await QueuedTask.Run(() => _tableControl.GetSeletedRowIndexes());
if (curSelectedRowList.Any())
{
... here, _tableControl is of type TableControl and its content was created through TableControlContentFactory.Create(workLayer), where worklayer is of type MapMember. The resulting content object contains the correct value in its MapMember property. However, when running _tableControl.GetSeletedObjectIds() as List<long>) the list has a count of zero. When I look at _tableControl at the point when one of the rows is selected, then _tableControl has the following property values: TableContent: null RowCount: -1 ActiveFieldIndex: null ActiveRowIndex: -1 How can it be, that I do get these values, even though the table is populated with correct data, the control itself counts 234 items/rows in it, and when I select one or more rows the count of selected rows is shown correctly in the bottom of the control as e.g. "1 of 234"?
... View more
09-21-2021
02:43 AM
|
0
|
4
|
2192
|
|
POST
|
Yes that's certainly possible in the SDK. The active mapview has four methods to do so: PanTo PanToAsync PanToSelected PanToSelectedAsync
... View more
09-15-2021
02:04 AM
|
0
|
1
|
1241
|
|
POST
|
Well, go through this page here. I assume you already aware of the dock property but have also a look at the dockWith property. A value of 'bottom' for the dock property should do the trick...
... View more
09-15-2021
01:21 AM
|
1
|
0
|
4382
|
|
POST
|
Currently I am creating QueryLayer using ArcGIS.Core.Data functionality where I retrieve data from an Oracle database, utilizing the Database, and DatabaseConnectionProperties class etc. It works! However, it is relatively slow, and I think it has something to do with the way the SDK connects and reads the database in question. For simple retrieving of unique values from a database table I am not using Esri classes any more, but went with Oracle.ManagedDataAccess. It is a drastic change in response time doing so, and my "customers" love it. Hence, I would like to use Oracle.ManagedDataAccess to query the database, retrieve the data and use them to create a FeatureClass, and FeatureLayer. Retrieving the data is not the problem, but creating the FeatureClass is. Currently I am creating the FeatureClass through the OpenTable method of the ArcGIS.Core.Data Database class. That means I am back to square one, because I have to establish the connection through the AGP SDK. Is there a way to use Oracle.ManagedDataAccess to create QueryLayer?
... View more
09-15-2021
12:39 AM
|
0
|
2
|
1640
|
|
POST
|
Closing the XAML files and rebuilding the solution helped. The issue remaining is line 17 in the PaneHeaderControlView.xaml Error: XDG0008 The name "TableControl" does not exist in the namespace "clr-namespace:ArcGIS.Desktop.Editing;assembly=ArcGIS.Desktop.Editing". I can clearly see in the Assembly Explorer of Visual Studio 2019 that ArcGIS.Desktop.Editing contains TableControl. Do you have a solution for that as well, @Wolf
... View more
08-31-2021
05:43 AM
|
0
|
0
|
11705
|
|
POST
|
In my project I am having a dockpanel with two panes inside. All views give me errors, still the project can be built... Here the structure of my project: Stepper |_ Commands |_ Models |_ ViewModels |_ PaneHeaderControlViewModel.cs |_ PaneHeaderRulesViewModel.cs |_ Views |_ PaneHeaderControlView.xaml |_ PaneHeaderRulesView.xaml _ StepperDockpane.xaml _ StepperDockpaneViewModel.cs Here the content of StepperDockpane.xaml <UserControl x:Class="Stepper.StepperDockpaneView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ui="clr-namespace:Stepper"
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
xmlns:viewModel="clr-namespace:Stepper.ViewModels"
xmlns:view="clr-namespace:Stepper.Views"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="300"
d:DataContext="{Binding Path=ui.StepperDockpaneViewModel}">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
</ResourceDictionary.MergedDictionaries>
<DataTemplate DataType="{x:Type viewModel:PaneHeaderRulesViewModel}">
<view:PaneHeaderRulesView />
</DataTemplate>
<DataTemplate DataType="{x:Type viewModel:PaneHeaderControlViewModel}">
<view:PaneHeaderControlView />
</DataTemplate>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" LastChildFill="False" KeyboardNavigation.TabNavigation="Local" Height="30" Margin="5,0">
<ListBox x:Name="primaryNavigator" DockPanel.Dock="Left"
Style="{DynamicResource Esri_ListBoxPanelIndicator}"
ItemsSource="{Binding PrimaryMenuList}"
SelectedIndex="{Binding SelectedPanelHeaderIndex, Mode=TwoWay}"
IsSynchronizedWithCurrentItem="True" />
<controls:BurgerButton DockPanel.Dock="Right"
ToolTip="{Binding BurgerButtonTooltip}"
PopupMenu="{Binding BurgerButtonMenu}"/>
</DockPanel>
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<StackPanel>
<ContentPresenter Content="{Binding CurrentPage}"></ContentPresenter>
</StackPanel>
</ScrollViewer>
</Grid>
</UserControl> Line 17 returns: Error: Could not load file or assembly 'ArcGIS.Desktop.Framework, Culture=neutral' or one of its dependencies. The referenced file could not be found. Line 34 returns: Warning: The resource "Esri_ListBoxPanelIndicator" could not be resolved. ------------------------------------ Here the relevant content of PaneHeaderRulesView.xaml <UserControl x:Class="Stepper.Views.PaneHeaderRulesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
xmlns:ui="clr-namespace:Stepper.Views"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:viewmodels="clr-namespace:Stepper.ViewModels"
d:DataContext="{d:DesignInstance Type=viewmodels:PaneHeaderRulesViewModel}"
mc:Ignorable="d"
d:DesignHeight="520" d:DesignWidth="300">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources> Line 16 returns: Error: Could not load file or assembly 'ArcGIS.Desktop.Framework, Culture=neutral' or one of its dependencies. The referenced file could not be found. ------------------------------------ Here the relevant content of PaneHeaderControlView.xaml <UserControl x:Class="Stepper.Views.PaneHeaderControlView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
xmlns:editing="clr-namespace:ArcGIS.Desktop.Editing;assembly=ArcGIS.Desktop.Editing"
xmlns:ui="clr-namespace:Stepper.Views"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:viewmodels="clr-namespace:Stepper.ViewModels"
d:DataContext="{d:DesignInstance Type=viewmodels:PaneHeaderControlViewModel}"
mc:Ignorable="d"
d:DesignHeight="520" d:DesignWidth="300">
.
.
.
<editing:TableControl Grid.Row="2" x:Name="tableControl"
AutomationProperties.AutomationId="_tableControl"
HorizontalAlignment="Stretch"
TableContent="{Binding Path=TableContent}"
MinHeight="450"
MaxHeight="500"
RowContextMenu="{StaticResource StepperRowContextMenu}"
SelectedRowContextMenu="{StaticResource StepperRowContextMenu}"
ColumnContextMenu="{StaticResource StepperColumnContextMenu}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDoubleClick">
<i:InvokeCommandAction Command="{Binding ZoomItemCommand}"/>
</i:EventTrigger>
<i:EventTrigger EventName="SelectedRowsChanged">
<i:InvokeCommandAction Command="{Binding GetSelectedRowCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</editing:TableControl> Line 17 returns: Error: XDG0008 The name "TableControl" does not exist in the namespace "clr-namespace:ArcGIS.Desktop.Editing;assembly=ArcGIS.Desktop.Editing". I can clearly see in the Assembly Explorer of Visual Studio 2019 that ArcGIS.Desktop.Editing contains TableControl. ------------------------------------ On top of all this is every reference a la Style="{DynamicResource Esri_xxxx}" marked with a warning that the resource could not be resolved. I am using Visual Studio version 16.11.1 .NET Framework version 4.8.03752 ArcGIS Pro SDK for .NET in version 2.8.0.29751 ArcGIS Pro SDK for .NET (Utilities) in version 2.8.0.29751 and the project has x64 as platform target. Any help is appreciated.
... View more
08-19-2021
03:22 AM
|
0
|
2
|
11805
|
|
POST
|
I have a FeatureClass of polygons. A good part of those polygons have holes and I would like to get rid of them if they are below a certain size. I managed to get to the parts and calculate their size. I also thought I delete unwanted parts... however, when writing them out there is no difference. I do not really know if my error is located in the part of deleting parts or at the point where I try to write them to disk. arcpy.management.CreateFeatureclass(fc_path, 'clear', 'POLYGON', spatial_reference=sr)
geoms = arcpy.management.CopyFeatures(simplified, arcpy.Geometry())
with arcpy.da.InsertCursor(without_holes, 'SHAPE@') as iCursor:
for geom in geoms:
partnum = geom.partCount
parts = geom.getPart()
if partnum > 1:
lst_rm = []
for n in range(1, partnum):
part = geom.getPart(n)
part_geom = arcpy.Polygon(part, sr)
if part_geom.area > 50.0:
lst_rm.append(n)
lst_rm.sort(reverse=True)
for i in lst_rm:
parts.remove(i)
polygon = arcpy.Polygon(parts)
row = (polygon,)
iCursor.insertRow(row)
... View more
05-11-2021
03:36 AM
|
0
|
1
|
1704
|
|
POST
|
I am running in some strange problems in ArcGIS Pro 2.7.2. Within a notebook I started to define some environmental settings, setting addOutputsToMap to false and overwriteOutput to true, and I specify the outputCoordinateSystem via arcpy.env.outputCoordinateSystem = arcpy.SpatialReference(25832) I retrieve an iterator containing the path of a number of tif files and iterate over it. Within the iteration I utilize RasterToPolygon arcpy.conversion.RasterToPolygon(tif,out_fc,simplify="NO_SIMPLIFY",raster_field="Value") Even though I set outputOverwrite = True I am getting ERROR 000528: Output Path/to/File already exists from RasterToPolygon. Does not happen all the time, but from time to time. The other problem is the coordinate system defined for the notebook. In case I leave the environmental attribute addOutputsToMap at the default value I get the immediate response while running the RasterToPolygon cell. The feature classes created by the tool are missing the spatial reference! I checked... all tif files are in EPSG 25832, the feature dataset I am writing the feature classes into is defined in EPSG 25832, and the notebook defines the coordinate system to EPSG 25832. I was also running the RasterToPolygon in an with-statement, utilizing EnvManger... to no avail. I wonder where RasterToPolygon drops the coordinate system. In case it's not meant to honour neither environmental settings, nor inherit spatial references from input files then I wonder why there is no parameter, offering the possibility to define the output coordinate system for the method. The Python used here is in version 3.7.9 and I did not clone the environment... it's the default.
... View more
05-03-2021
07:02 AM
|
0
|
1
|
1328
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2026 01:54 AM | |
| 1 | 10-24-2022 01:23 AM | |
| 1 | 09-15-2021 01:21 AM | |
| 2 | 08-30-2022 04:31 AM | |
| 2 | 04-24-2024 04:23 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-08-2026
05:14 AM
|