laptop and a wrench

Bug

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

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM006132
SubmittedJanuary 17, 2007
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.2
Program languageVBA
StatusNon-Reproducible

Additional Information

No Public Explanation

Workaround

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

Steps to Reproduce

Bug ID: NIM006132

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options