laptop and a wrench

Erro

Unable to call IGraphicsContainer.LocateElements() in MxDocument_OpenDocument event to get PageLayout elements.

Última Publicação: April 6, 2018 ArcGIS for Desktop
Número de ID do Erro NIM063686
EnviadoDecember 18, 2010
Última ModificaçãoJune 5, 2024
Aplica-se àArcGIS for Desktop
Versão encontrada10.0
Idioma do programaVBA
StatusWill Not Be Addressed

Informações Adicionais

Currently, we have no plans to address this issue.

Solução Provisória

' Remove or comment-out the line ' Set pEnumElement = pGraphicsContainer.LocateElements(pPoint, 0.2) ' as it will be inside the Do Loop of this workaround as shown below: Set pEnumElement = Nothing lngCounter = 0 Do While pEnumElement Is Nothing Set pEnumElement = pGraphicsContainer.LocateElements(pPoint, 0.2) lngCounter = lngCounter + 1 Debug.Print lngCounter '*************************************************************** 'Using DoEvents here. Without DoEvents, pEnumElement is always 'Nothing and an endless loop will occur. '*************************************************************** DoEvents '******************************************************************** 'This avoids endless loop whenever DoEvents is not used. This should 'not be needed with DoEvents, but is here in case DoEvents is removed, 'otherwise, endless loop occurs and document will never open. '******************************************************************** If lngCounter > 100000 Then Exit Function MsgBox "Exit Function" End If Loop '************************************************************************ 'Alternatively to DoEvents, using MsgBox gives time for PageLayout 'elements to load. When user dismisses MsgBox, all elements have loaded. '************************************************************************ 'MsgBox "Adding stamp..."

Etapas para Reproduzir

ID do Erro: NIM063686

Software:

  • ArcGIS for Desktop

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