Script to clean the revit

Hello !

I’m currently making a dynamo program for a modular building.
My plan is to make it flixable by its 3 dimensions.
My problem is : When i move the numberslider corresponding to one dimension, beams bug and don’t errase when they have to.
For exemple, i choose 15m long, and then 12m (the module of the building is 3m), beams from 12m to 15m aren’t errased and they go a little bit everywhere…
Is it possible to solve this problem ?
I thought to delete the whole building when my program begin, is it possible ?

Sorry for my bad english…


Imbert C.

Sounds like a combination of creation order and memory issue. Please post your script for more specific help.


Here it is :