Is This Content Helpful?
We're glad to know this article was helpful.
When you assign a symbol to a graphic, it is important you select the appropriate symbol type for the graphic type. If you select the wrong symbol type, you may get error messages.
This script below demonstrates how to check the graphic type before assigning a symbol.
'-- Get the GraphicList from the active view document
theView = av.GetActiveDoc
theGList = theView.GetGraphics
'-- Create a BasicMarker symbol type
aBasicMarker = BasicMarker.Make
'-- Create a TextSymbol symbol type
aTextSymbol = TextSymbol.Make
'-- Cycle through the GraphicList
'-- If it is a GraphicShape of type point, set symbol to aBasicMarker
'-- If it is a GraphicText, set symbol to aTextSymbol
for each g in theGList
If (g.is(GraphicShape)) Then
If (g.GetShape.Is(Point)) Then
ElseIf (g.Is(GraphicText)) then
For additional properties you can set for each symbol type, see the Symbol(Class) topic in ArcView Help.