ObjectNames - PYTHON 不支持

Returns or modifies the user-definable name of one or more objects.

语法

Rhino.ObjectNames ( arrObjects [, arrNames])

参数

arrObjects

Required.Array.An array of strings identifying the objects.

arrNames

可选参数。Array.   An array of strings identifying the new user-definable names.This array must have the same upper bounds as arrObjects.Each element in arrNames will correspond with each element in arrObjects.

返回值

Array

If arrNames is not specified,  the current object names if successful.Note, if an object does not have a user-definable name, it's corresponding element will be Null.

Array

If arrNames is specified,  the previous object names if successful.Note, if an object does not have a user-definable name, it's corresponding element will be Null.

Null

如果执行不成功或出错,返回空值。

示例

Dim arrObjects, arrNames, strName, i

arrObjects = Rhino.GetObjects("Select objects")

If IsArray(arrObjects) Then

  arrNames = Rhino.ObjectNames(arrObjects)

  If IsArray(arrNames) Then

    For i = 0 to UBound(arrObjects)

      strName = arrNames(i)

      If IsNull(strName) Then strName = "<none>"

      Rhino.Print arrObjects(i) & " = " & strName

    Next

  End If

End If

同见

ObjectsByName

ObjectName