[AppleScript] 纯文本查看 复制代码
#coding=utf-8
import rhinoscriptsyntax as rs
docObjs = ghenv.Component.OnPingDocument().SelectedObjects()
for obj in docObjs:
objHelp = []
objHelp.append(obj.Name)
objHelp.append('\n')
objHelp.append(obj.Description)
objHelp.append("\n")
parInput = obj.Params.Input
parOutput = obj.Params.Output
objHelp.append("Input parameters: ")
for inp in parInput:
index1 = str(inp).find('_')
index2 = str(inp).find(' ')
objHelp.append(inp.NickName + "(" + str(inp)[index1+1:index2] + ")")
objHelp.append(inp.Description)
objHelp.append("\n")
objHelp.append("Output parameters:")
for oup in parOutput:
index1 = str(oup).find('_')
index2 = str(oup).find(' ')
objHelp.append(oup.NickName + "(" + str(oup)[index1+1:index2] + ")")
objHelp.append(oup.Description)
objHelp.append("\n")
objHelp.append("====================================================================================================================")
objHelp.append("\n")
for p in objHelp:
print (p)