laptop and a wrench

Bug

Dashed lines created programatically in ArcMap using ISimpleLineSymbol, print as solid lines.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM001365
SubmittedMarch 2, 2006
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.1
StatusKnown Limit

Additional Information

No Public Explanation

Workaround

All dashed simple lines have problems with printing and vector export, regardless of whether they are created in the ArcMap UI or programatically. The answer is to use cartographic lines instead (this is one reason why the 6:6 line symbol is of type Cartographic Line instead of Simple Line).=============================================Use ICartographicLineSymbol and specify a template. Please see the sample VBA code below. This code will produce a dashed line which prints as dashed.Sub AddLine_DataView_CartographicLineSymbol() Dim pMxDoc As IMxDocument Dim pPageLayout As IPageLayout Dim pGC As IGraphicsContainer Dim pPointColl As IPointCollection Dim pElement As IElement Dim pLineElement As ILineElement Dim pPoint1 As IPoint Dim pPoint2 As IPoint Dim pPoint3 As IPoint Dim pColor As IRgbColor Dim pLineSymbol As ICartographicLineSymbol 'ISimpleLineSymbol Dim pMap As IMap Dim pLineProps As ILineProperties Set pMxDoc = ThisDocument Set pMap = pMxDoc.FocusMap '.Maps.Item(0) Set pGC = pMap Set pPageLayout = pMxDoc.PageLayout Set pPointColl = New Polyline Set pElement = New LineElement Set pLineElement = New LineElement Set pPoint1 = New Point Set pPoint2 = New Point Set pPoint3 = New Point Set pColor = New RgbColor Set pLineSymbol = New CartographicLineSymbol 'pLineElement.Symbol Set pLineProps = pLineSymbol Set pElement = pLineElement Dim eLineTemplate As ITemplateSet eLineTemplate = New TemplateeLineTemplate.Interval = 2eLineTemplate.AddPatternElement 5, 1Set pLineProps.Template = eLineTemplatepLineSymbol.Width = 1pLineSymbol.Cap = esriLCSButtpLineSymbol.Join = esriLJSBevel With pColor .Blue = 125 .Red = 180 .Green = 42 End With pLineSymbol.Color = pColor pLineElement.Symbol = pLineSymbol With pPoint1 .X = -104 .Y = 26 End With With pPoint2 .X = -97 .Y = 35 End With With pPoint3 .X = -87 .Y = 42 End With pPointColl.AddPoint pPoint1 pPointColl.AddPoint pPoint2 pPointColl.AddPoint pPoint3 pElement.Geometry = pPointColl pGC.AddElement pElement, 0 pMxDoc.ActiveView.Refresh End Sub

Steps to Reproduce

Bug ID: NIM001365

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