Hi guys, I often use Offset curve and want the offsat curve to have the same properties as the one I offsat. Same layer, same color, same thickness, same linetype etc so it works as a copy of the original.
Now the new curve just ends up on the active layer with default settings.
import rhinoscriptsyntax as rs
def OffsetKeepProperties():
crv=rs.GetObject("Select curve to offset",4,preselect=True,select=True)
if not crv: return
rs.Command("Offset")
lco=rs.LastCreatedObjects()
if lco:
rs.EnableRedraw(False)
rs.MatchObjectAttributes(lco,crv)
OffsetKeepProperties()