Set Work Plane

A couple of things:

  • In python def means that a function is defined. Nothing will happen before you call the function.
  • I think you need to convert the reference plane to a sketch plane before it can be used to set the workplane.