Is it possible to select the edge of a polysurface inside a block?

Hi Guys,

The title kind of says it all. I found this code from Mitch’s old topic and am trying to select the edge of a polysurface which is inside a block. Is this possible?

import Rhino
def GetCurvesAndEdges():
    filter=Rhino.DocObjects.ObjectType.EdgeFilter | Rhino.DocObjects.ObjectType.Curve
    rc, objrefs = Rhino.Input.RhinoGet.GetMultipleObjects("Select curves or surface edges", False, filter)
    if rc != Rhino.Commands.Result.Success: return rc    
    return [objref.Curve().ToNurbsCurve() for objref in objrefs]

Ok, I did a bit of a small hack and am now using rs.command to run DupEdge. Does anybody know how to finish the DupEdge command after I select one curve instead of waiting for more input?

Edit: on second thought it seems to be rather handy to not immediately finish the command in case I click on the wrong curve. But now I ran into this problem.

Came across this now.

Duplicate Edge of a block