判断一个物件是否存在 。
rhinocsriptsyntax.IsObject (object_id)
rhinocsript.object.IsObject (object_id)
object_id |
必须参数。字符串或 Guid。物件的 ID 。 |
True |
物件存在。 |
False |
物件不存在。 |
import rhinoscriptsyntax as rs
#Do something here...
if rs.IsObject(id):
print "The object exists."
else:
print "The object does not exist."