laptop and a wrench

Erro

The MapView.Print() method returns the "System.NullReferenceException: 'Object reference not set to an instance of an object.'" and "System.Exception: 'Print service failure: Object reference not set to an instance of an object.'" exceptions when called normally.

ArcGIS Pro SDK for .NET
Número de ID do Erro BUG-000167134
EnviadoApril 30, 2024
Última ModificaçãoJune 27, 2025
Aplica-se àArcGIS Pro SDK for .NET
Versão encontrada3.2
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0 64 Bit
StatusAs Designed

Informações Adicionais

The older SDK MapView.Print(printerSettings) function was marked obsolete and was replaced by a new MapView.Print(printerSettingInfo) or Layout.Print(printerSettingInfo, MapSeriesOptions) function. Here are some snippets: PrinterSettingsInfo info = new PrinterSettingsInfo(); var printerSettings = info.PrinterSettings; printerSettings.PrinterName = "some printer name"; printerSettings.DefaultPageSettings.Landscape = false; printerSettings.Copies = 1; info.DoShowSelectionSymbology = false; info.LayoutOrMapName = layout.Name; layout.Print(info);

Solução Provisória

Use the new Pro 3.5 MapView.Print(printerSettingInfo) or Layout.Print(printerSettingInfo, MapSeriesOptions) functions.

Etapas para Reproduzir

ID do Erro: BUG-000167134

Software:

  • ArcGIS Pro SDK for .NET

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download