CollectionItem.Name

説明

オブジェクトまたはサブコンポーネントの名前をStringとして戻します。オブジェクトの場合は、オブジェクトの名前そのものが戻されますが、サブコンポーネント(ポイント、セグメント、ファセットなど)の場合は、3d オブジェクトの名前およびその 3d オブジェクト上でのサブコンポーネントの位置が戻されます(たとえば、"cube.pnt[4]")。

注: サブコンポーネントに対するこのプロパティの動作は、バージョン 3.0 で変更されました。3.0 より前は、サブコンポーネントはオブジェクト名のみを戻しました。

VBScript の例

'========================================================
' 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]"