POST
|
Sorry, end of year crunch. I've been meaning to get back to this topic. What I ended up doing was to implement in C#, which is much more familiar to me than XAML, and easier to debug. So in the constructor for our about box, in the .xaml.cs file, I have the following. public About_Modal() { InitializeComponent(); DataContext = new About_ModalModel(); string lightLogoPath = @"Images/terrago_logo.png".ToLower(); string darkLogoPath = @"DarkImages/terrago_logo.png".ToLower(); BitmapImage lightLogoImg = new BitmapImage(); lightLogoImg.BeginInit(); lightLogoImg.UriSource = new Uri(@"pack://application:,,,/publisher-arcgispro;component/" + lightLogoPath); lightLogoImg.EndInit(); BitmapImage darkLogoImg = new BitmapImage(); darkLogoImg.BeginInit(); darkLogoImg.UriSource = new Uri(@"pack://application:,,,/publisher-arcgispro;component/" + darkLogoPath); darkLogoImg.EndInit(); Image logoImg = this.FindName("TerraGoLogo") as Image; if (FrameworkApplication.ApplicationTheme == ApplicationTheme.Default) logoImg.Source = lightLogoImg; else logoImg.Source = darkLogoImg; } In the XAML I have the following snippet. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Top"> <Image Name="TerraGoLogo" HorizontalAlignment="Center" Height="76" VerticalAlignment="Top" Width="358" Margin="0,10,0,5"/> . . . </StackPanel>
... View more
01-12-2022
08:48 AM
|
0
|
0
|
543
|
POST
|
Thanks I had not run across that particular document.
... View more
11-16-2021
09:14 AM
|
0
|
0
|
603
|
POST
|
ArcGIS Pro SDK 2.6, XAML I'm upgrading a dialog displayed by my add-in to recognize light and dark themes. I'm following the standard community sample. I have the standard Themes, Images, and DarkImages folders. The contents of the image folders are set the Resource build action and to no copy. In LightResources.xaml I have inserted: <BitmapImage
x:Key="TerraGoLogo"
UriSource="../../../Images/terrago_logo.png"/> I have also tried: <BitmapImage
x:Key="TerraGoLogo"
UriSource="pack://application:,,,/publisher-arcgispro;component/Resources/Images/terrago_logo.png"/> In my dialog XAML I have inserted: <Image HorizontalAlignment="Center"
Height="76"
VerticalAlignment="Top"
Width="358"
Margin="0,10,0,5"
Source="{DynamicResource TerraGoLogo}"/> The dialog XAML worked before I replaced a string literal path with the DynamicResource. The path used in the first attempt is the same the original path, the relative path from the XAML file. I've also tried the path relative to the project file. Now the logo does not display at runtime. TIA for any help.
... View more
11-11-2021
03:25 PM
|
0
|
2
|
655
|
POST
|
Pro SDK 2.6 Creating a XAML dialog using ProWindow. The controls I place in the window are not getting the same styling as do the same controls in the Pro UI. (I'm in the middle of upgrading this to support dark mode.) Is there a way to do that without manually styling controls as you will see I have started in the code below? (See Windows.Resources for example) <controls:ProWindow x:Class="publisher_arcgispro.UI.Export.Export.MapSeriesDlg"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:local="clr-namespace:publisher_arcgispro.UI.Export.Export"
xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
xmlns:contracts="clr-namespace:ArcGIS.Desktop.Framework.Contracts;assembly=ArcGIS.Desktop.Framework"
mc:Ignorable="d"
Title="Test Dialog"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
SizeToContent="WidthAndHeight" >
<Window.Resources>
<Style x:Key="GenericControlStyle" TargetType="Control" >
<Setter Property="Foreground" Value="{DynamicResource Esri_TextControlBrush}"></Setter>
<Setter Property="Background" Value="{DynamicResource Esri_ControlBackgroundBrush}"></Setter>
<Setter Property="BorderBrush" Value="{DynamicResource Esri_ControlBackgroundBrush}"></Setter>
</Style>
<Style BasedOn="{StaticResource GenericControlStyle}" TargetType="Label">
<Setter Property="Height" Value="20"/>
<Setter Property="Margin" Value="0,0,0,0"></Setter>
<Setter Property="Padding" Value="0"></Setter>
</Style>
<Style BasedOn="{StaticResource GenericControlStyle}" TargetType="Expander">
<Setter Property="Margin" Value="0,5,0,5"/>
</Style>
<Style BasedOn="{StaticResource GenericControlStyle}" TargetType="Button">
<Setter Property="Height" Value="20"/>
<Setter Property="Width" Value="75"/>
<Setter Property="Margin" Value="5,0,0,0"/>
</Style>
<Style BasedOn="{StaticResource GenericControlStyle}" TargetType="RadioButton">
<Setter Property="Margin" Value="5,5,0,5"/>
</Style>
<Style BasedOn="{StaticResource GenericControlStyle}" TargetType="CheckBox">
<Setter Property="Margin" Value="15,0,0,0"/>
</Style>
<Style BasedOn="{StaticResource GenericControlStyle}" TargetType="TextBox">
<Setter Property="Height" Value="20"/>
<Setter Property="Margin" Value="10,0,0,5"/>
<Setter Property="Padding" Value="0"/>
</Style>
<Style BasedOn="{StaticResource GenericControlStyle}" TargetType="ComboBox">
<Setter Property="Margin" Value="0,0,0,0"/>
<Setter Property="Block.Foreground" Value="{DynamicResource Esri_TextControlBrush}"></Setter>
<Setter Property="Block.Background" Value="{DynamicResource Esri_ControlBackgroundBrush}"></Setter>
<Setter Property="Block.BorderBrush" Value="{DynamicResource Esri_ControlBackgroundBrush}"></Setter>
</Style>
</Window.Resources>
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.Resources>
</Grid.Resources>
<Grid.DataContext>
<Binding Path="MapSeriesDlgModel" />
</Grid.DataContext>
<Expander Header="Pages"
Grid.Row="0"
Grid.Column="0"
IsExpanded="True">
<StackPanel>
<RadioButton Name="AllPagesRB"
GroupName="PagesRBGroup"
Checked="PagesSelectedChanged"/>
<RadioButton Name="CurrentPageRB"
GroupName="PagesRBGroup"
Checked="PagesSelectedChanged"/>
<RadioButton Name="SelectedFeaturesRB"
GroupName="PagesRBGroup"
Checked="PagesSelectedChanged"/>
<CheckBox Name="ShowSelectionCB"
Content="Show selection synmbology for index features"
Checked="ShowSelectionChanged"
IsEnabled="{Binding ElementName=SelectedFeaturesRB, Path=IsChecked}" />
<!--<RadioButton Name="SelectedPagesRB"
GroupName="PagesRBGroup"
Checked="PagesSelectedChanged"/>-->
<RadioButton Name="PageRangeRB"
Content="Page range (for example: "1, 3, 5-12")"
GroupName="PagesRBGroup"
Checked="PagesSelectedChanged"/>
<TextBox Name="PageRangeTB"
HorizontalAlignment="Left"
Width="240"
MaxLength="100"
TextChanged="PageRangeChanged"
IsEnabled="{Binding ElementName=PageRangeRB, Path=IsChecked}" />
</StackPanel>
</Expander>
<Expander Header="Files"
Grid.Row="1"
Grid.Column="0"
IsExpanded="True">
<StackPanel Margin="5,0,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Label Content="Files"
Grid.Column="0" Grid.Row="0"
Padding="0" />
<ComboBox Name="FilesCombo"
Grid.Column="1" Grid.Row="0"
HorizontalAlignment="Right"
SelectionChanged="FilesSelectionChanged">
<ComboBoxItem Content="Single PDF File"/>
<ComboBoxItem Content="Multiple Single PDF Files (Page name as suffix)"/>
<ComboBoxItem Content="Multiple Single PDF Files (Page number as suffix)"/>
</ComboBox>
</Grid>
<!--<CheckBox Name="GroupingCB"
Content="Order pages by grouping"
Grid.Column="0" Grid.Row="1"
IsEnabled="False" />-->
</StackPanel>
</Expander>
<StackPanel Orientation="Vertical"
Grid.Row="2"
Grid.Column="0">
<Label Content="Output Folder"/>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Left">
<TextBox Name="OutputFolderTB"
IsReadOnly="True"
VerticalAlignment="Center"
Width="360" />
<Button Name="OutputFolderBtn"
Content="Select"
VerticalAlignment="Center"
Click="OutputFolder_Button_Click" />
</StackPanel>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Left">
<Label Content="Basename"/>
<TextBox Name="BasenameTB"
Width="307"
MaxLength="100"
TextChanged="BasenameChanged" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Right"
Grid.Row="3"
Grid.Column="0"
Margin="0,10,0,0">
<Button Name="OKBtn"
Content="OK"
Click="OK_Button_Click"
IsDefault="True" />
<Button Name="CancleBtn"
Content="Cancel"
Click="Cancel_Button_Click"
IsCancel="True" />
</StackPanel>
</Grid>
</controls:ProWindow>
... View more
11-11-2021
12:54 PM
|
0
|
2
|
668
|
POST
|
I need to find out the number of pages the user has selected in the map series tab of a layout's contents pane. It looks like I have to do this by examining the dock pane in the Pro UI. Any help on how to achieve that? UI coding is not what I normally do. I already have discovered I can do: DockPane contentPane = ProApp.DockPaneManager.Find("esri_core_contentsDockPane"); However, DockPane seems pretty opaque. I assume I need to get the "List Map Series Pages" tab and examine the tree displayed to count the number of selected items. I should add that this really needs to happen behind the scenes, so the state of the Pro UI is not affected. And I need to support both SpatialMapSeries and BookmarkMapSeries, TIA for any help. Alan
... View more
10-05-2021
08:03 AM
|
0
|
0
|
224
|
POST
|
Thanks, DavidPike. It turned out the real problem was my misunderstanding of the expected output from Buffer_analysis(), not an incorrect buffer distance. I wrongly jumped to the conclusion the buffer distance was at fault when the output feature count was one. When I earlier ran Buffer_analysis() manually I did not look closely enough at the output, only looking at it graphically. I thought I was looking at multiple polygons but in fact it was a single polygon with multiple outer rings. So adding a call to MultipartToSinglepart_management() to convert the outer rings to polygons solved my problem.
... View more
06-28-2021
09:16 AM
|
0
|
0
|
1311
|
POST
|
Thanks, DavidPike. I'm doing this now: degrees_per_meter = 360.0 / 40075000.0 distance = '{0} DecimalDegrees'.format(float(bin_radius) * degrees_per_meter) arcpy.Buffer_analysis(fc_photo, fc_buffer, distance, dissolve_option='ALL', method='GEODESIC') However the buffer distance is still much larger than what I would expect based on the points I'm feeding it. The script is an adaptation of ESRI's GeoTaggedPhotosToPoints_management, so the input points are coming from geotagged JPEG files. I'm adding the ability to merge clusters of points into single points with multiple photos attached. I'm running my tool in an ArcMap 10.8 session with a new, completely empty map. Everything works except this problem with the buffer distance.
... View more
06-24-2021
01:03 PM
|
0
|
2
|
1352
|
POST
|
I can't seem to get buffer_analysis to buffer the distance I want. I'm writing a Python tool that needs to buffer points to polygons and dissolve them as part of the workflow. From the ArcMap 10.8 UI the buffer_analysis tool works as I expect it to work on the same input data and parameters I'm testing my tool against. The documentation seems to indicate that I can specify '10 meters' for 'buffer_distance_or_field' when calling it from my tool, but the actual buffer distance I get is much, much larger. The input feature class is geographic (WGS84), but this does not seem to be problem when I use the tool from the UI. I get the expected buffer distance in the output. I am passing the 'method' parameter as 'PLANAR' in both cases. What could I be doing wrong? TIA, Alan
... View more
06-22-2021
02:55 PM
|
0
|
4
|
1459
|
BLOG
|
We are seeking a Senior Software Developer to become an integral part of our team! As part of our TerraGo GeoPDF® team, you will design, build, and maintain products built using C++/# languages, ArcGIS® and Adobe® PDFL SDKs, plus open source software. We need someone experienced with full stack software product development and support. GIS and graphics programming knowledge is required. Familiarity with Visual Studio (2010-2017) and Python [2/3] is extremely helpful. Responsibilities: Work with a development team to build and maintain our software products Design and architect new features for desktop and server side software Ensure quality code through test development and code review Analyze user needs and develop software solutions Recommend software upgrades to optimize operational efficiency Document all programming tasks and procedures Perform routine software maintenance Qualifications: Previous experience in software development, computer engineering, or other related fields Deadline and detail-oriented Strong analytical and critical thinking skills US citizen ESRI ArcGIS Desirable Skills ArcObjects® [COM/IDL] development esriSystem, esriGeometry, esriDisplay, esriOutput, esriGeoDatabase, esriDataSources*, esriCarto, esriFramework, esriControls, esriArcMap, esriCatalog ArcGIS Desktop, ArcGIS Server/Enterprise ArcGIS Pro SDK [.NET] development ArcGIS.Core.Geometry, ArcGIS.Core.CIM, ArcGIS.Core.Data, ArcGIS.Desktop.Framework, ArcGIS.Desktop.Mapping, ArcGIS.Desktop.Layouts, ArcGIS.Desktop.Catalog PDF Desirable Skills Adobe PDFL development PDF internals PDF image/data compression AS, COS, PD, PDE, PDS layers General Desirable Skills Graphics programming Trigonometry Vector and image graphics generation, parsing, and processing Vector and image compression and file formats Helpful Skills And Experience Building complex, heterogeneous VS solutions Microsoft C++/CLI language GDAL/OGR PROJ SQLite/GeoPackage SQL Automated testing with cppunit and Jenkins Perforce change management Visit our ZipRecruiter page [https://www.ziprecruiter.com/jobs/terrago-cc3bf63c/senior-arcgis-developer-583567ec?lvk=1RsTGGZrzQxci7DnB5MRog.--LwJwX09fc] or email <careers@terragotech.com>.
... View more
03-25-2021
07:15 AM
|
0
|
0
|
865
|
POST
|
The _RPT*() fucntions are the C equivalents of the System.Diagnostics.Debug.Write*() methods (which I use in the managed code portions of the add-in). It's definitely helpful to be able to see my debug output in the same stream as messages emanating from ArcGIS. So I hope ESRI will change something if it's not possible to do this in the current release.
... View more
02-19-2021
07:23 AM
|
0
|
0
|
1084
|
POST
|
Pro 2.7, VS 2017. My add-in's progress dialog stopped displaying in debug build with the message, "* * Warning: Progress dialog is disabled when debugging * *", in the VS output window. Can this be disabled, i.e, the progress dialog display re-enabled? Whatever was done seems to also disable the "_RPT*()" statements (crtdbg.h) in my C++ code that I need for resolving some complex issues.
... View more
02-18-2021
12:50 PM
|
1
|
5
|
1147
|
POST
|
I'm parsing PDFs generated by ArcGIS Pro 2.4-2.7. I'm having difficulties predicting the order in which label classes are drawn to the PDF. This is important because in some cases the label class optional content groups written to the PDF have duplicate names, so I cannot rely on identifying them by name alone. Initially, it seemed that the rules for an entire map were driven by map layer order and label class priority like this: 1. Draw all unprioritized label classes first, in layer draw order. 2. Draw all prioritized label classes, in priority order. But since I've found maps where it seems label classes within a layer are drawn as a group, in the order I initially thought applied to the map as a whole, and the groups are drawn in layer draw order. But I have a map where one layer's labels seem inexplicably to be drawn out of layer draw order. I haven't managed to resolve logic than successfully predicts label class order for all of my test maps. Is there a published rule set? Is there some other property besides layer draw order and label class priority that determines label class draw order? TIA for any knowledge.
... View more
02-08-2021
02:08 PM
|
0
|
0
|
575
|
POST
|
I didn't mention in my original post that while most of the time the process only takes a few minutes, we have seen layouts that literally required hours for the process to complete. It would be nice if the user could still work on other layouts or on maps not referenced by the layout being processed while the process is taking place. Though I guess the users could always restrict their projects to one layout per project and simply run and additional Pro session to continue work.
... View more
01-28-2021
06:50 AM
|
0
|
0
|
1128
|
POST
|
Yes, that's a potential solution, though I have no objection to the user working in another layout in the project or on a map that is not referenced by the layout being processed. In the spirit the Pro application it seems like I should place minimal limitations on the user.
... View more
01-28-2021
06:09 AM
|
0
|
0
|
1129
|
POST
|
I'm not sure what MainGrid is supposed to be, and am not familiar with 'binding', but I think you're suggesting disabling portions of the UI?
... View more
01-28-2021
06:07 AM
|
0
|
0
|
1129
|
Title | Kudos | Posted |
---|---|---|
1 | 10-08-2020 09:29 AM | |
1 | 02-18-2021 12:50 PM | |
1 | 01-22-2020 12:27 PM | |
1 | 07-30-2019 12:22 PM | |
1 | 06-17-2020 10:38 AM |
Online Status |
Offline
|
Date Last Visited |
05-05-2022
08:23 AM
|