重命名一个现有的群组。
rhinocsriptsyntax.RenameGroup (old_name, new_name)
rhinocsript.group.RenameGroup (old_name, new_name)
old_name |
必须参数。字符串。现有群组的名称。 |
new_name |
必须参数。字符串。群组的新名称。 |
字符串 |
返回群组的新名称。 |
None |
如果执行不成功或出错,返回空值。 |
import rhinoscriptsyntax as rs
strOldGroup = rs.GetString("Old group name")
if strOldGroup:
strNewGroup = rs.GetString("New group name")
if strNewName: rs.RenameGroup(strOldGroup, strNewGroup)
AddGroup