|
POST
|
Thanks for checking, Wolf. I just upgrade to VS 17.6.1 (released today), and hoped that would resolve the issue. It did not.
... View more
05-22-2023
01:40 PM
|
0
|
0
|
4605
|
|
POST
|
Here's something interesting...I did some crazy tests and was able to trick the system into correcting itself. I changed controls:ProWindow to ProWindow, then right clicked on the XAML file to View Designer. The Designer finally appears, but with "Invalid Markup" (as expected due to invalid code). I then immediately modified the XAML code back to controls:ProWindow and poof! The XAML designer was displaying/working again as expected. Bizarre.
... View more
05-19-2023
01:45 PM
|
3
|
0
|
4663
|
|
POST
|
Hey everyone, Just curious if anybody else is experiencing this issue too. Today, I upgraded Visual Studio 2022 to v17.6.0 (released May 16th). Now I can't get any new or existing projects to display the ProWindow XAML Designer for my add-ins, even after rebuilding the projects and rebooting the PC, the issue remains. It will only display the XAML code itself. The XAML Designer is working as expected for user controls and WPF windows, so it seems isolated to ProWindows. If I build/rebuild the projects and test within ArcGIS Pro, the Pro Windows appear as expected. It's only missing from the XAML Designer in Visual Studio 2022. I even attempted to create fresh, new projects and load in brand new ProWindow items, but I get the same behavior. Here's a ProWindow XAML example that I haven't manipulated, in case you see something amiss. <controls:ProWindow x:Class="temp_TestingTheProAddIn.ProWindow2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
mc:Ignorable="d"
Title="ProWindow2" Height="300" Width="300"
WindowStartupLocation="CenterOwner"
>
<controls:ProWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</controls:ProWindow.Resources>
<Grid>
</Grid>
</controls:ProWindow> If it matters, I'm running Pro v3.1.1 with Pro SDK v3.1.0.41833. Thanks
... View more
05-19-2023
12:49 PM
|
0
|
8
|
4703
|
|
POST
|
Hello, This issue seems trivial, so hopefully I'm just overlooking something simple. I had a standalone CoreHost WPF application that would open at the intended height/width of 650/1100. I am attempting to recreate a similar template layout within a ProWindow, using much of the exact syntax from the other app. The XAML view within Visual Studio looks correct and matches what I had within the CoreHost app, but when I launch the add-in within Pro, the ProWindow no longer matches. Anybody have any idea what's causing this? How the app looks within Visual Studio 2022 (with Pro 3.1.1 installed, running latest 3.1.0.41833 Pro SDK version): How it looks when launched within ArcGIS Pro: Here's my XAML code: <controls:ProWindow x:Class="Pro_AddIn_Testing_2023.ProWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
mc:Ignorable="d"
Title="ProWindow" Height="Auto" Width="Auto"
WindowStartupLocation="CenterOwner"
>
<controls:ProWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</controls:ProWindow.Resources>
<Grid Height="650" Width="1100">
<StackPanel>
<TabControl x:Name="tabControl" Height="610" TabStripPlacement="Left" BorderThickness="0,0,0,0">
<TabItem x:Name="tabReplicaInformation" Header="Replica Information" Width="175">
<Grid>
<ComboBox x:Name="comboBox" HorizontalAlignment="Left" Margin="86,30,0,0" VerticalAlignment="Top" Width="120" IsReadOnly="True" SelectedIndex="0"/>
<DatePicker x:Name="datePicker" HorizontalAlignment="Left" Margin="589,52,0,0" VerticalAlignment="Top" />
<ListBox x:Name="listBox1" d:ItemsSource="{d:SampleData ItemCount=5}" Margin="24,103,421,25"/>
<ListBox x:Name="listBox2" d:ItemsSource="{d:SampleData ItemCount=5}" Width="200" Margin="689,103,30,25"/>
</Grid>
</TabItem>
<TabItem x:Name="tabFeatureCounts" Header="Feature Counts">
<Grid/>
</TabItem>
</TabControl>
<Separator Margin="0,0,0,0"/>
</StackPanel>
<ProgressBar x:Name="progressBar" Height="25" Width="775" HorizontalAlignment="Left" Margin="15,5,0,5" VerticalAlignment="Bottom" />
<Button x:Name="buttonRun" Content="Run" Width="100" Height="25" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,5,25,5" Click="buttonRun_Click"/>
</Grid>
</controls:ProWindow> Thanks for any insight!
... View more
05-10-2023
03:40 PM
|
0
|
5
|
1654
|
|
POST
|
Oh goodness, not even 30 minutes after posting this question, it now appears in My Esri. I guess I just timed things poorly! Thanks for your reply.
... View more
01-10-2023
02:02 PM
|
1
|
0
|
1629
|
|
POST
|
Hello, I noticed that Esri has published release notes for ArcGIS Pro 2.9.6, but My Esri caps out at the 2.9.5 patch. Anyone have any insight where 2.9.6 patch is, or if it's actually being released? We have end users who are having snapping issues via 2.9.5, but aren't ready to make the jump to Pro 3.0. The 2.9.6 patch (which appears to address their snapping issues) would be awesome for them to upgrade to, if only the option was available! The option to upgrade to 2.9.6 is not displaying within their ArcGIS Pro either. Thanks for any insight.
... View more
01-10-2023
01:30 PM
|
0
|
2
|
1675
|
|
POST
|
Haha, I was hopeful with that idea too originally! I can confirm that item.values.values (and item.values.count, for that matter) does not work. "AttributeError: 'list' object has no attribute 'values'"
... View more
10-19-2022
07:39 AM
|
0
|
0
|
1376
|
|
POST
|
Hey Jeff, I initially tried that, but itm.values doesn't work the way you think it does. An item's values refer to the grouped name classifications only. For example, if I have rendered a unique value with "Neighborhood A", the item value will be "Neighborhood A" with an itm.values length of 1. Hypothetically, if I have combined/grouped several classification names into one unique value (such as "Neighborhood A", "Neighborhood B", and "Neighborhood C"), then the itm.values length will be 3. Sadly, the itm.values information is used in a completely seperate way than counting the total number of features per unique value rendered. I might be able to pull something off with your second idea, but this might be too sluggish with the number of features we have to review each time. Thanks for the idea there, I may build something to test with and see how it goes. I may also end up submitting the renderer's feature count functionality as an enhancement to Esri. I'm not sure why they'd expose that conveniently within Pro, but not within Python.
... View more
10-19-2022
07:12 AM
|
0
|
2
|
1384
|
|
POST
|
I was encountering the same issue. However, all solutions above did not work for me. Turns out, my issue was that I had somehow corrupted my .aprx project file through previous (and albeit numerous!) script test cycles. Once I deleted the corrupted .aprx and replaced that file with a backup copy of itself, the script proceeded to save the .aprx as expected.
... View more
10-17-2022
01:57 PM
|
0
|
0
|
3531
|
|
POST
|
Hello everyone, Does anyone know if Esri has exposed the Count values within Python's ArcPy for the unique value renderer items? The current documentation indicates that the Item's description, label, symbol, and values are exposed via Python. However, ArcGIS Pro allows you to also display the number of occurrences per item by toggling the Count field (i.e. Show Count) within the Symbology pane: Unfortunately, I am unable to find this option within Python thus far. For our workflow, we do not "refresh" our unique value symbology each time a change is made. Pre-existing symbology needs to remain static. Because of that, we opt to add missing values (with .listMissingValues()). Afterwards, we manually go into ArcGIS Pro and check/remove any out-dated unique values that show a Count of 0: I'd like to automate this process where the script removes any unique values with a Count of 0, but that doesn't appear to be possible based on the documentation I've found thus far. I may be looking in the wrong place though. Does anybody have any insight into this, or if it's even possible via Python? Thanks!
... View more
10-17-2022
10:26 AM
|
0
|
5
|
1450
|
|
POST
|
After opening a support ticket with Esri, this behavior has been replicated and is being logged as a defect (ENH-000151963). In the meantime, the best workaround would be to deploy the following: try:
# Attempts to find the missing values and assign to list.
list_missing_values = layer_symbology.renderer.listMissingValues()
except SystemError:
# If no missing values, ignore the SystemError generated and assign the list to be empty.
list_missing_values = []
... View more
08-30-2022
07:25 AM
|
0
|
0
|
1294
|
|
POST
|
Thanks for the idea, Jeff. I just tried it. Unfortunately it's failing with the same error message. It's like Python is getting hung up on the method itself (maybe on the backend somehow...?) and just failing outright. I'll keep digging.
... View more
08-25-2022
12:25 PM
|
0
|
1
|
1381
|
|
POST
|
Hello, I'm encountering an issue with my Python script (using the standard libraries packaged within Pro 3.0.0 and Pro 3.0.1 installs). My goal has been to update some symbology within my Pro project. To do this, I locate all values that are not part of our symbology rendering, and simply add them into the existing renderer group. Using the .listMissingValues() functionality, I am able to locate these, add them with .addValues(), and this accomplishes the task successfully. Hooray! However, the problem lies in scenarios where there are 0 missing values. If the script does not find any missing values, the tool fails and produces this error: Traceback (most recent call last): File "C:\My\Python\Path\To\Script.py", line 27, in <module> list_missing_values = layer_symbology.renderer.listMissingValues() File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\_renderer.py", line 41, in listMissingValues self._arc_object.listMissingValues(*gp_fixargs((), True))) SystemError: <built-in method listMissingValues of MappingSymbologyObject object at 0x00000172C4BAA9B0> returned NULL without setting an error Is the .listMissingValues() method not designed to handle scenarios with 0 missing values, or am I missing something obvious? I assumed it would just spit out an empty list if it couldn't find any missing values, but that doesn't seem to be the case. I could band-aid this with a Try/Except to ignore SystemError messages for the .listMissingValues() step, but I would prefer not to do that. Anyway, thanks for any assistance! Here is my script thus far (when there are 0 missing values, the error mentioned above occurs at Line 27): import arcpy
aprx = arcpy.mp.ArcGISProject("The\\Project\\Path\\Being\\Used.aprx")
for a_map in aprx.listMaps():
if a_map.name != "Name of Map I am Needing":
continue
else:
print("Map Name: " + a_map.name)
for a_layer in a_map.listLayers():
if a_layer.name != "Layer Name I am Needing":
continue
else:
print("Layer Name: " + a_layer.name)
layer_symbology = a_layer.symbology
list_missing_values = layer_symbology.renderer.listMissingValues()
if len(layer_symbology.renderer.groups) != 1:
print("Group count error, please check symbology groups.")
else:
print("Symbology Group Header: " + str(layer_symbology.renderer.groups[0].heading))
if len(list_missing_values) == 0:
print("No missing values found.")
else:
for each_missing_value in list_missing_values:
print("Missing value count: " + str(len(each_missing_value.items)))
layer_symbology.renderer.addValues({layer_symbology.renderer.groups[0].heading: each_missing_value.items})
a_layer.symbology = layer_symbology
aprx.save()
print("Project saved.")
... View more
08-25-2022
10:46 AM
|
0
|
4
|
1423
|
|
POST
|
Thanks for sharing! Our agency uses scenarios #1 and #2 extensively. If it is helpful to you, I'm hoping Esri soon provides a bit more support for geodata services within Pro so that traditional workflows can continue with ease (for a least a while longer). After I submitted this to Esri, their support confirmed it as a bug. There is hope for even more replication support in Pro!
... View more
04-04-2022
12:29 PM
|
0
|
0
|
2447
|
|
POST
|
This is not a solution, but an update. Esri Support has confirmed to me that this is a bug with ArcGIS Pro. It is being logged as BUG-000147966. They indicated that there is no current time-table on a fix for this.
... View more
03-28-2022
09:03 AM
|
0
|
0
|
1028
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 04-19-2024 10:31 AM | |
| 1 | 06-14-2024 08:37 AM | |
| 1 | 06-14-2024 10:12 AM | |
| 1 | 06-14-2024 10:03 AM | |
| 1 | 06-12-2024 09:00 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|