Item property (Symbols)
Returns a Symbol object based on its Name property. Read-only.
Applies to
Collections: Symbols
Syntax
object.Item(Index)
Parameters
Part | Description |
---|---|
object | Required. An expression that returns a Symbols collection. |
Index | Required Variant. The name of the symbol, or an integer representing the index of the symbol to return. |
Remarks
The Item property is the default property for the Symbols collection.
The index of a symbol within a Symbols collection is not the same as the ID property of the symbol. To return a symbol based on the ID, use the ItemByID property of the Symbols collection.
Example
Sub DrawPushpinWithSymbol()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc As MapPoint.Location
Dim objPushpin As MapPoint.Pushpin
'Set up application and Pushpin object
objApp.Visible = True
objApp.UserControl = True
Set objMap = objApp.ActiveMap
Set objLoc = objMap.GetLocation(0, 0)
Set objPushpin = objMap.AddPushpin(objLoc)
'Set the Pushpin symbol to a red car
Let objPushpin.Symbol = objMap.Symbols.Item(83)
'Zooms to object to see the results
objPushpin.Location.GoTo
objMap.Altitude = 1000
End Sub