Create cubes in Revit through Dynamo

revit
python
geometry
dynamo

#1

I’m having trouble with some codes i did. The objective is to “automatic” create cubes in Revit that represents buildings at a certain place. My code creates them well, but when i close dynamo the cubes disapears, how can i make the cubes visible even after i close Dynamo? I’m not using transactions, btw.
Bellow you can see my script(there’s more codes, but this is the principal).
image


#2

This is only creating Dynamo elements, which are showing as ‘previews’ of the geometry in the Revit environment. You need to create a family or families from the objects to have them exist after you close our Dynamo. Look into the springs package, familyinstance.bygeometry or similar.


#3

If it‘s just cubes, why not use a parametric family instead. It‘ll give you a lot more control over your finished product in Revit (think categories & parameters).