Error message: This object cannot be modified because it is controlled by a document

I create a NURBSCurve via code. when cloning it i get this Error.
I thought only Rhino Objects can belong to a document not Geometery classes?
What could be the problem here?
(I am not doing this on the GUI Thread.)

Rhino.Runtime.DocumentCollectedException: This object cannot be modified because it is controlled by a document.
   at Rhino.Runtime.CommonObject.ConstPointer()
   at Rhino.Geometry.Curve.Duplicate()
   at ....

I found the problem.
The NURBSCurve had already been disposed when I tried to clone it.
I declared it (in F#) with use nc = instead of let nc =. That was the mistake.

Good you found the cause yourself.

How is your F# scripting plug-in coming along?

@nathanletwory The editor is working well. Still Alpha status though. I will show it here:


do you want to test / contribute ?

1 Like

Good luck with the demo :slight_smile:

I’m very interested, but I don’t know if I have enough time to put into. I wouldn’t mind testing it, but in the very least I can cheer for the project :slight_smile:

/Nathan

I am also all in for the cheer!

Maybe @carlosperez or @Carla_Sologuren or @scottd can blog about this event?
It seems worth a reminder.

Sure you can

1 Like

Blogged!: http://blog.rhino3d.com/2018/06/f-scripting-for-3d-model-of-louvre-abu.html

2 Likes