Returns or sets the description of a block definition.
rhinoscriptsyntax.BlockDescription(block_name, description=None)
rhinoscript.block.BlockDescription(block_name, description=None)
block_name |
Required. String. The name of an existing block definition. |
description |
Optional. String. The new description. If omitted, the current description is returned. |
String |
If a description is not specified, the current description if successful. |
String |
If a description is specified, the previous description if successful. |
import rhinoscriptsyntax as rs
blockname = rs.GetString("Block name to list description")
if rs.IsBlock(blockname):
desc = rs.BlockDescription(blockname)
if desc is None: print "No description"
else: print desc