Python Plugin with Rhino Script Compiler

Hi @siemen, i never used this way to compile my scripts to a plugin as it failed for various reasons. If you want to have full control over (multiple) commands in one plugin, i would recommend to use the RhinoScriptCompiler for it.

Your script would then just look like below, the RunCommand structure is not required and you do not have to append _cmd to your script file name.

def MyFunctionName():
  print "Hello World"
  # get a point
  point = rs.GetPoint("Pick a point")
  if point:
    rs.AddPoint(point)
# call it 
MyFunctionName()

The command name it registers upon installation will be the name of the python script file, eg. If you name it MakePoint.py the command is called by typing MakePoint to the command line.
_
c.

1 Like