Delete used object

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.

4 Likes