PROBLEM
After running the 'Create composite marker' script, the new marker appears as expected in Symbol Window, but the marker is in the wrong color when added to the view. Also, the foreground and back ground colors can not be changed independently.
The script used to generate the marker does not lock the marker element colors.
Code:
'-- Sample Script
av.GetSymbolWin.Open
av.GetSymbolWin.SetPanel(#SYMBOLWIN_PANEL_MARKER)
'-- Set the properties of each marker symbol according
'-- to your requirements.
m1 = BasicMarker.Make
m1.SetStyle(#BASICMARKER_STYLE_PATTERN)
m1.SetSize(16)
m1.SetColor(Color.GetRed)
'-- Lock the first color
m1.SetColorLock(true)
m1.SetFont(Font.Make("ESRI Cartography","normal"))
m1.SetCharacter(5)
m2 = BasicMarker.Make
m2.SetStyle(#BASICMARKER_STYLE_PATTERN)
m2.SetSize(16)
m2.SetColor(Color.GetBlue)
'-- Uncomment the next line to lock the second color
'm2.SetColorLock(true)
m2.SetFont(Font.Make("ESRI Cartography","normal"))
m2.SetCharacter(35)
'-- Make as marker symbols as there are layers in your composite symbol
cm = CompositeMarker.Make(SymbolList.FromList({m1,m2}))
mp = av.GetSymbolWin.GetPalette.GetList(#PALETTE_LIST_MARKER)
mp.Add(cm)
av.GetSymbolWin.RefreshPalette(#PALETTE_LIST_MARKER)
Article ID:000004222
Get help from ArcGIS experts
Download the Esri Support App