This document is archived and information here might be outdated.  Recommended version.


IPlaceCollection.Add Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Controls)  

IPlaceCollection.Add Method

Add to place collection. If allowChangeName is true and place with the same name exists, unique name will be assigned, the place will not be added otherwise.

[Visual Basic .NET]
Public Function Add ( _
    ByVal pPlace As IPlace, _
    ByVal allowChangeName As Boolean _
) As Boolean
[C#]
public bool Add (
    IPlace pPlace,
    bool allowChangeName
);
[C++]
HRESULT Add(
  IPlace* pPlace,
  VARIANT_BOOL allowChangeName,
  VARIANT_BOOL* pAdded
);
[C++]

Parameters pPlace [in]
pPlace is a parameter of type IPlace allowChangeName [in] allowChangeName is a parameter of type VARIANT_BOOL pAdded [out, retval] pAdded is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine.

Description

Adds the specified Place to the end of the collection.

allowChangeName specifies whether the IPlace::Name can be renamed when adding the same Place to the collection multiple times.

For example, if allowChangeName is true and a Place is added with an IPlace::Name set to "My Place", and there is already a Place object with that name in the collection the Place object will be added to the collection with an IPlace::Name set to "My Place [2]". If allowChangeName is false the Place object will not get added to the collection.

See Also

IPlaceCollection Interface