Rhino Script Compiler for Rhino5, first Beta

Strange thing here too, i´ve been able to compile your original script to rhp (compiler version RSC_12082013.exe) on Win7 x64 and this is what i got:

once i load the plugin file below in Rhino5 Sr8 x64, it registers a new command “BlaBlaCircle”. If i run the command it does not create the circle. BUT: if i run any script from the python editor once, then run the BlaBlaCircle command a circle gets created :smile:

Btw. it seems not to be related to the

if __name__=="__main__":

problem mentioned above, i´ve used this code in a second build which behaves identical, this is the one inside the plugin:

import Rhino
import scriptcontext
import System.Guid

def MyAddCircle():
    center = Rhino.Geometry.Point3d(0, 0, 0)
    radius = 10.0
    c = Rhino.Geometry.Circle(center, radius)
    if scriptcontext.doc.Objects.AddCircle(c)!=System.Guid.Empty:
        scriptcontext.doc.Views.Redraw()
        return Rhino.Commands.Result.Success
    return Rhino.Commands.Result.Failure

MyAddCircle()

Here is the compiled plugin: MakeCircle.rhp (7 KB)

@stevebaer could it be that in order to run a compiled python script, it only works after initialisation as done when running a script using the python editor the first time ?

@Rodrigo_Medina_ which version of the compiler did you use ? The first one i mentioned above or this one ?

c.