Selection.Item

説明

Selection 内の指定されたキーにあるエレメントを戻します。エレメントが 3d オブジェクトの場合は、X3DObject が戻されます。エレメントがサブコンポーネントの場合は、CollectionItem が戻されます。

C#構文

// get accessor

Object Selection.get_Item( Object in_Key );

パラメータ

パラメータ タイプ 説明
Key StringまたはInteger キーが String の場合は項目の名前、Integer の場合は選択内の項目の位置

1. VBScript の例

' This example prints all the items in the 

' Selection, according to their position

SelectAll

dim oSelection, i

set oSelection = Application.Selection

for i = 0 to (oSelection.Count - 1)

	Application.LogMessage oSelection(i).Name

next

' OUTPUT:

'INFO : "Camera_Root"

'INFO : "Camera"

'INFO : "Camera_Interest"

'INFO : "light"

2. VBScript の例

' This example gets an item in the 

' Selection according to its name

SelectAll

set oSelection = Application.Selection

set oCam = oSelection.Item("Camera_Root")

LogMessage typename(oCam)

for each oParam in oCam.Parameters

	LogMessage oParam.FullName

next

' OUTPUT

'INFO : "CameraRig"

'INFO : "Camera_Root.Name"

'INFO : "Camera_Root.kine.local.blendweight"

'INFO : "Camera_Root.kine.local.active"

'INFO : "Camera_Root.kine.local.posx"

'INFO : "Camera_Root.kine.local.posy"

'INFO : "Camera_Root.kine.local.posz"

'INFO : "Camera_Root.kine.local.rotx"

'INFO : "Camera_Root.kine.local.roty"

'INFO : "Camera_Root.kine.local.rotz"

'INFO : "Camera_Root.kine.local.quatw"

'INFO : "Camera_Root.kine.local.quatx"

'INFO : "Camera_Root.kine.local.quaty"

'INFO : "Camera_Root.kine.local.quatz"

'INFO : "Camera_Root.kine.local.sclx"

'INFO : "Camera_Root.kine.local.scly"

'INFO : "Camera_Root.kine.local.sclz"

'INFO : "Camera_Root.kine.local.sclorix"

'INFO : "Camera_Root.kine.local.scloriy"

'INFO : "Camera_Root.kine.local.scloriz"

'INFO : "Camera_Root.kine.local.cnsscl"

'INFO : "Camera_Root.kine.local.cnsori"

'INFO : "Camera_Root.kine.local.cnspos"

'INFO : "Camera_Root.kine.local.affbyscl"

'INFO : "Camera_Root.kine.local.affbyori"

'INFO : "Camera_Root.kine.local.posxmaxactive"

'INFO : "Camera_Root.kine.local.posxminactive"

'INFO : "Camera_Root.kine.local.posymaxactive"

'INFO : "Camera_Root.kine.local.posyminactive"

'INFO : "Camera_Root.kine.local.poszmaxactive"

'INFO : "Camera_Root.kine.local.poszminactive"

'INFO : "Camera_Root.kine.local.rotxmaxactive"

'INFO : "Camera_Root.kine.local.rotxminactive"

'INFO : "Camera_Root.kine.local.rotymaxactive"

'INFO : "Camera_Root.kine.local.rotyminactive"

'INFO : "Camera_Root.kine.local.rotzmaxactive"

'INFO : "Camera_Root.kine.local.rotzminactive"

'INFO : "Camera_Root.kine.local.siscaling"

'INFO : "Camera_Root.kine.local.rotorder"