Delete used object

Hi, I’am converting some spline into arc, anyway to delete the spline that I have selected in the curve box when I bake ?
because most of them are very similar and it take a lot of time select the old one and delete it after I bake…

thanks !

Just right click on the Curve component and select Internalise. You can then delete the original Rhino geometry.

You may need to graph your attributes at the bake component. There are several places your tree might not be correct. Mainly the un-grafted into the grafted merge of curves and group ???

You can bake to a different layer (modify attributes component) then delete objects on the original layer. The best solution is to use worksessions, ref your geometry then bake into a new file, with a bakename. Referenced Geometry updates, you bake and replace.

thanx for your answers
Maybe I didn’t discribe the situation very well, but it’s a tool for all my team, it have to be very easy to use, I just really want to know how to delete object with a toolbox, not manually.
they pick only some curve on a layer not all of them, so I cannot erase everything on a layer…

I don’t know what “graph” mean… and what is it made for…

Graft, not graph – my bad.

I’m not familiar with the workflow you are describing, perhaps someone else is – best of luck.

sorry I should have write “graft”…

thanks for your help ! hope someone else will help me…

Hi again!

Bake-Replace
Bake-Replace.gh (6.8 KB)

I made a small c# script by looking around in other threads (mainly David Rutten answers).
This script works with single objects, Lists, but not trees.
Please provide same length lists for the first 2 inputs (old and new geometry lists).
This script does NOT record on “undo” command, beware!
If you trigger it it, it will delete old referenced geo, place/bake the new one while keeping attributes such layer, color, linetype , and also guid (this last could backfire you, beware again! … that’s why it keeps being referenced while i press the button again and again)

I’m a rookie with c# so give it a proper test in different situations before relying on it.

1 Like

Just out of personal experience, insert a data dam after your input geometry. This will at least provide you the old geometry till you update it. Just in addition to Riccardo’s warning.

1 Like

thanx, it look awesome, i’am gonna test it very soon