import Rhino
import rhinoscriptsyntax
import scriptcontext
#offset_object
#soft_edited_curve
object, objref = Rhino.Input.RhinoGet.GetOneObject ( "Pick Curve to Offset and Soft Edit" , False , Rhino.DocObjects.CurveObject)
# Returns bool
print object
print objref
Just a couple of things. First the above error, Cannot create instances of CurveObject because it has no public constructors. This is after picking the curve. What have I done incorrectly?
Then, a question on unpacking. I’m familar with this now, but a little bit thrown by the documentation which states:
public static Result GetOneObject(
string prompt,
bool acceptNothing,
ObjectType filter,
out ObjRef rhObject
What’s the difference between the ‘out’ and usual ‘returned’ value ? I noticed that I can unpack it the two variables nicely, but want to know the distinction between these two terms. Or is it a C# term? At first I thought it was an extra argument.
Thanks!
8 posts - 2 participants