HOW TO
You can make a stipple fill pattern from an icon format, such as a .bmp file. The following steps and sample code show how to do this.
Code:
'--- Stipple Pattern Making Script
'-- Edit this variable to contain the pathname to your .bmp file
theIcon = Icon.Make("cd:\data\illinois.bmp".AsFileName)
'-- MsgBox.Info(theIcon.GetClass.GetClassName, "icon")
theStipple = Stipple.Make(theIcon)
'-- If you're curious...
theStippleWidth = theStipple.GetWidth
theStippleHeight = theStipple.GetHeight
'MsgBox.Info(theStippleWidth.AsString ++ theStippleHeight.AsString, "stipple")
'-- Make the RasterFill and set its charasteristics
theRasterFill = RasterFill.Make
theRasterFill.SetStipple(theStipple)
theRasterFill.SetStyle (#RASTERFILL_STYLE_STIPPLE) 'There's also OPAQUESTIPPLE
theRasterFill.SetColor(Color.GetCyan)
'-- Comment out one of the following blocks of code depending
'-- on whether you want to symbolize a graphic or a polygon theme
'-- Symbolize an existing graphic in the View
theView = av.GetActiveDoc
theViewGraphicsList = theView.GetGraphics
theSingleGraphicInTheView = theViewGraphicsList.Get(0)
theSingleGraphicInTheView.SetSymbol(theRasterFill)
theView.Invalidate
'-- Or, update a polygon Legend
theView = av.GetActiveDoc
theTheme = theView.GetThemes.Get(0) 'Uses the first theme in the TOC
theLegend = theTheme.GetLegend
theSyms = theLegend.GetSymbols
theSyms.Set(0, theRasterFill) 'Assumes Single Symbol
theTheme.UpdateLegend
'--- End of Script
Get help from ArcGIS experts
Download the Esri Support App