Problem of Deleting curve

Hi all,
I have a curve, I project it to a plane. After handling, I delete it, but function delete returns false => the curve has not been deleted yet.
Here is my code:

Plane wPlane = RhinoDoc.Views.ActiveView.ActiveViewport.ConstructionPlane();
Curve projectedCrv = Curve.ProjectToPlane(myCurve, wPlane);
Guid crvID = projectedCrv.GetType().GUID;
bool result = RhinoDoc.Objects.Delete(crvID, true);

result is false. Where was I wrong?

Thanks a lot!

After projection, you would need to add the result to the document first. Then you get the guid of the curve object in the document. The guid you obtain is not the right one, it has nothing to do with the rhino document, I’m afraid.

Yes, I’ve done and it is OK.
Thank you!