I have a tricky problem. I have defined a custom object by inheriting CustomCurveObject, but I cannot save it. Re-open the document and the object is converted to curveObject.
The idea is that you write something to the document in
PlugIn.WriteDocument (note: you must also override
WriteDocument is not called).
In the document you write for example which Guids are CustomCurveObjects.
PlugIn.ReadDocument is called, you read back the Guids that were custom curve objects. But you can’t modify the document while it is being read! So subscribe to
RhinoDoc.EndOpenDocument and then do whatever it is that needs to be done to replace the objects with your CustomCurveObject implementation.
This approach is taken to support loading the file without having your plug-in loaded, in that case, the objects are loaded as normal curves.