I’m having a small problem with copying/pasting/saving/loading my customcurveobject. What should I do to make it happen ? Currently when I copy this object with command line, it works fine. Problems start whenever I try to use clipboard or when I save the file… after loading (or actually on saving), my geometry turns into LineCurve. Does this class even supports serialization ? If not, what would be a solution ?
Imports Rhino Imports Rhino.Geometry Imports System.Drawing Public Class CustomObj Inherits Rhino.DocObjects.Custom.CustomCurveObject Public Overrides Function ToString() As String Return "Custom Line" End Function Sub New() MyBase.New(New LineCurve(New Point3d(0, 0, 0), New Point3d(1, 1, 1))) End Sub Protected Overrides Sub OnDraw(e As Display.DrawEventArgs) e.Display.DrawCurve(Me.CurveGeometry, Color.Aqua) End Sub Public Overrides Function ShortDescription(plural As Boolean) As String Return "Custom Line" End Function End Class