## CollectionItem.Name

### Description

Returns the name of the object or subcomponent as a String. For objects, just the object name is returned, but for subcomponents (points, segments, facets, etc.), this property returns the name of the 3D object and the subcomponent's position on it (for example, "cube.pnt[4]").
Note: The behavior of this property for subcomponents changed in version 3.0. Before version 3.0, subcomponents returned their object's name only.

### C# Syntax

    // get accessor
    String rtn = CollectionItem.Name;

### Examples

#### VBScript Example

    '========================================================
    ' This example demonstrates what the CollectionItem.Name
    ' property returns with a variety of inputs
    ' First try it on a camera:
    Set oCollectionItem = CreateObject("XSI.CollectionItem")
    oCollectionItem.Value = "Camera"
    printName oCollectionItem
    ' Then on a sphere:
    CreatePrim "Sphere", "MeshSurface"
    Set oSphere = CreateObject("XSI.CollectionItem")
    oSphere.Value = "sphere"
    printName oSphere
    ' Then on one of the sphere's edges:
    Set oEdge = CreateObject("XSI.CollectionItem")
    oEdge.Value = ActiveSceneRoot.FindChild( ,,siMeshFamily ).ActivePrimitive.Geometry.Segments(3).SubComponent
    printName oEdge
    '========================================================
    Function printName( in_object )
            ' Returns the full path for subcomponents
            LogMessage in_object.Name
    End Function
    '========================================================
    ' OUTPUT:
    'INFO : "Camera"
    'INFO : "sphere"
    'INFO : "sphere.edge[3]"