laptop and a wrench

Error

IPersistStream::Load crashes arcmap when persisting renderers that contain picturemarkersymbols are used.

Última publicación: August 25, 2014 No Product Found
Número de ID del error NIM006132
EnviadoJanuary 17, 2007
Última modificaciónJune 5, 2024
Relacionado conNo Product Found
Versión encontrada9.2
Lenguaje del programaVBA
EstadoNon-Reproducible

Información adicional

No Public Explanation

Solución alternativa

XML Serilization seems to work with renderers that contain picture*symbols.Public Sub SaveRendererToXML()On Error GoTo EH:Dim mxDoc As IMxDocumentSet mxDoc = ThisDocumentDim gfLayer As IGeoFeatureLayerSet gfLayer = mxDoc.FocusMap.Layer(0)Dim fRenderer As IFeatureRendererSet fRenderer = gfLayer.Renderer'*** Create XmlStream and XmlWriter ***Dim pStream As IXMLStreamSet pStream = New XMLStreamDim pWriter As IXMLWriterSet pWriter = New xmlWriterpWriter.WriteTo pStream'*** Create XmlSerializer ***Dim pSerializer As IXMLSerializerSet pSerializer = New XMLSerializerpSerializer.WriteObject pWriter, Nothing, Nothing, "", "", fRenderer'*** Save stream as an xml ***pStream.SaveToFile (xmlPath)Exit SubEH:MsgBox Err.Number & vbCrLf & Err.DescriptionEnd SubPublic Sub ReadRendererFromXML()On Error GoTo EH:'*** Deserialzation of string ***Dim pStream2 As IXMLStreamSet pStream2 = New XMLStreampStream2.LoadFromFile (xmlPath)'*** Create XmlReader and pass stream ***Dim pReader As IXMLReaderSet pReader = New XMLReaderpReader.ReadFrom pStream2'*** Create XmlSerializer and Read Object ***Dim pSerializer2 As IXMLSerializerSet pSerializer2 = New XMLSerializerDim r As IFeatureRendererSet r = pSerializer2.ReadObject(pReader, Nothing, Nothing)Dim mxDoc As IMxDocumentSet mxDoc = ThisDocumentDim gfLayer As IGeoFeatureLayerSet gfLayer = mxDoc.FocusMap.Layer(0)Set gfLayer.Renderer = rmxDoc.ActiveView.RefreshmxDoc.CurrentContentsView.Refresh NothingExit SubEH:MsgBox Err.Number & vbCrLf & Err.DescriptionEnd Sub

Pasos para reproducir

ID del error: NIM006132

Software:

  • No Product Found

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga