I think this typo appeared in the latest Rhino update.
rhobject.Select(true)
Message: global name ‘true’ is not defined
def DuplicateEdgeCurves(object_id, select=False):
"""Duplicates the edge curves of a surface or polysurface. For more
information, see the Rhino help file for information on the DupEdge
command.
Parameters:
object_id (guid): The identifier of the surface or polysurface object.
select (bool, optional): Select the duplicated edge curves. The default is not
to select (False).
Returns:
list(guid, ..): identifying the newly created curve objects if successful.
None: if not successful, or on error.
Example:
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select surface or polysurface", rs.filter.surface | rs.filter.polysurface)
if obj:
rs.DuplicateEdgeCurves( obj, True )
rs.DeleteObject( obj )
See Also:
IsPolysurface
IsSurface
"""
brep = rhutil.coercebrep(object_id, True)
out_curves = brep.DuplicateEdgeCurves()
curves = []
for curve in out_curves:
if curve.IsValid:
rc = scriptcontext.doc.Objects.AddCurve(curve)
curve.Dispose()
if rc==System.Guid.Empty: return None
curves.append(rc)
if select:
rhobject = rhutil.coercerhinoobject(rc)
rhobject.Select(true)
if curves: scriptcontext.doc.Views.Redraw()
return curves