Select to view content in your preferred language

Layout.Export - selected features are not "exported"

416
4
01-21-2025 02:13 AM
leon_a
by
New Contributor

Using following code in ArcGIS Pro 3.4.0, selected features are not drawn using selection symbology.

If layout is exported manually, selected features are exported.

In ArcGIS Pro 2.9.9 selected features are exported as well.

 

var layoutItem = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault();
await QueuedTask.Run(() =>
{
  Layout layout = layoutItem.GetLayout();
  layout.Export(
    new PDFFormat
    {
      OutputFileName = "selected_features.pdf"
    },
    new MapSeriesExportOptions
    {
      ShowSelectedSymbology = true,

    }
  );
});

 

 

 

 

0 Kudos
4 Replies
JeffBarrette
Esri Regular Contributor

Thanks for reporting this.  We recently added a new, non-map series option on the export pane called "Show selection symbology".  This should work with mapviews, non-mapseries layouts and mapseries layouts.  As a result we plan to deprecate the option on the map series.  BUT the following should work and it does not.  We are investigating it and hope to address it immediately.

        async protected override void OnClick()
        {
            var layoutItem = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault(item => item.Name.Equals("Layout_MS"));
            await QueuedTask.Run(() =>
            {
                Layout layout = layoutItem.GetLayout();
                layout.Export(
                  new PDFFormat
                  {
                      OutputFileName = @"c:\temp\selected_features_MS.pdf",
                      DoShowSelectionSymbology = true
                  } 
                );
            });

 Jeff - Layout (SDK) and arcpy.mp teams

0 Kudos
jeremywiles1981
Emerging Contributor

Could somebody look at why there are some objects missing from exported pdfs sometimes, but not always?  I get the same behavior if I export via ArcGIS's Export to PDF tool or the Layout.Export(ExportFormat) method in the SDK. 

I am still working with 3.3 and the 3.3 SDK, but not limited to it.  If this has already been addressed in 3.4, it would be nice to hear.

0 Kudos
JeffBarrette
Esri Regular Contributor

@jeremywiles1981 is this a different issue?  I.e., are selected features not being exported or are you talking about something else.  Can you reproduce in the UI and/or SDK?

Jeff - Layout (SDK) and arcpy.mp teams

0 Kudos
jeremywiles1981
Emerging Contributor

It is something else, but related.  Your team would likely be the one to speak to about this.  The pdfs do not match the layout when exported to pdf inconsistently, no matter what combination of settings are used.  Sometimes one element is missing, sometimes several, and sometimes none at all.

I have a case number that should include all of the relevant information, if that would help.  It was made nearly a year ago.  It was paused due to my sudden need for a medical leave, but I am going to request to re-open it if I cannot find an answer.

Something came up recently that has caused me to need to move quickly on this, so when I saw that somebody else was experiencing an issue exporting to pdf, I rashly commented on it.

If you have time and access to support data, it is case number #03585308 - "Needs assistance with: when exporting, missing elements from a layout." 

0 Kudos