Grasshopper

algorithmic modeling for Rhino

I have a Rhino.Geometry.NurbsCurve object in python and I'm trying to figure out how to delete it.  The only way I know how to delete something is using it's Id, but I don't have the Id, just the NurbsCurve instance.  Is there a way to get the Id from a NurbsCurve instance?

Views: 455

Replies to This Discussion

Hi Wesley,

Are you using a ghPython component or Rhino Python Editor?
If your NurbeCurve hasn't been added to the Rhino or Grasshopper document, you can't retrieve its id.

Could you try to just delete the variable that contains the NurbsCurve by using "del"?

In addition to the great answer by Djordje, just by not referencing the variable in your code any longer, at a certain point the .Net garbage collector will kick in and release memory.

Was your answer concerning that aspect? Or what other aspect of deletion were you after?

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service