今天有人在原厂qq群问:“有没有命令可以选择一个图块,然后犀牛视窗中所有的同名图块都被选中”简单写了两句脚本,分享一下
[AppleScript] 纯文本查看 复制代码 #coding=utf-8
#作者:月之眼
import rhinoscriptsyntax as rs
import scriptcontext as sc
objects = rs.GetObjects("要选择的图块",rs.filter.instance)
if(objects):
objectsName = [rs.BlockInstanceName(i) for i in objects]
for i in objectsName:
guid = rs.BlockInstances(i)
if(guid):
rs.SelectObjects(guid)
|