laptop and a wrench

漏洞

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

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM001365
已提交March 2, 2006
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.1
状态Known Limit

附加信息

No Public Explanation

解决办法

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

重现步骤

漏洞 ID: NIM001365

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项