Add method (Symbols)

Adds a .bmp, .ico, or .cur file to the Symbols collection. Returns the newly created Symbol object.

Applies to

Collections:  Symbols

Syntax

object.Add(FileName)

Parameters

Part Description
object Required. An expression that returns a Symbols collection.
FileName Required String. The name of the file that contains the symbol you want to add.

Remarks

The UseTransparency property default for new Symbol objects is True.

The Name property default for new Symbol objects is the file name of the graphic without the extension. The name can be modified, if necessary, to make it unique.

Example

  
    Sub ImportCustomSymbol()

Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objPin As MapPoint.Pushpin
Dim objSymbol As MapPoint.Symbol

'Set up the application
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True

'Add a Pushpin to the map
Set objPin = objMap.AddPushpin(objMap.FindResults("Seattle, WA")(1))

'Get a new symbol and change the symbol of the Pushpin on the map
Set objSymbol = objMap.Symbols.Add(objApp.Path + "\Samples\CAirport.bmp")
objPin.Symbol = objSymbol.ID

End Sub

Note  This sample code contains data that is specifically for use in MapPoint North America; it is for illustration purposes only.