Add Component (Location) - Multiple 'bakes' (transactions?) to Revit

I am currently using Rhino Inside Revit to place Enscape Planting Families on named Revit topo subregions.

There is a bit of scattering and density changes that I want to only display in Rhino as bounding boxes (quick!) and delay the placement of the actual component with a boolean+gate.

This works once, but subsequent toggles just replace the previous component. The undo from the previous series of place components remain listed, but the components themselves disappear.

Is this because the entirety of the script is wrapped in a single transaction? Are there ways to have independent ‘bakes’ to Revit? (beyond saving, closing and reopening)

try adding a separate Add Component for the Sub2

Thanks Rickson,

If I understand you correctly, I can just add multiple subregions and the script to write accordingly. (see images) That’s not the problem.

I think the idea I am striving for is that this is an interface for any number of subregions and settings. I don’t want to explicitly place an add component for each sub region. I want the user to be able to select a single or multiple, change density (per regions selected) and then bake… and then possibly repeat as many times as they want without overwriting previous iterations. It is a step-wise process.


So many ways to do this. The question is what works best?

For selecting between 2 inputs at the press of a button, I sometimes use Pick N Choose with a Boolean:

For selecting between detailed and not detailed display, you could use a Shared Parameter on the objects to use View Filters between the detailed and the not detailed version of the trees. Of course both versions are then baked into the Revit file.

We are also experimenting with a Sub-category creator. You could create a Tree Family with all the Trees in the Site Category, then have the detailed trees in one custom sub-category and the simple trees in a different custom sub-category.

1 Like

Thanks @scottd! All exciting developments.

I think I am trying and failing to describe the exact problem. It is really about persistence - when I send different data to the Component by Location - it replaces the previous iteration. Which makes sense to some degree - I want to know a mechanism for breaking that realtime connection in Revit ala baking geometry in Rhino.

I want to let a user select a sub region, change density and mix for that sub region and then ‘bake’ to components in Revit.

I want them then to repeat this step for a different subregion, with possibly different scattering settings.

I have this all working. The problem is that each subsequent push of the ‘Bake’ button unleashing the component info to the Add Component (By Location) then replaces the previous iteration.

I already have a button that acts as a data dam that lets me iterate in rhino/gh and then save the most expensive (read slowest) step for last - placing the component. It is not a problem of Sub 1 or 2 - I want this to work with a topo with 30 sub regions or 2 or 4 or 5…

What I have now - does what my very first gif shows - each ‘bake’ unleashed by pressing the button - replaces the previous ‘bake’.



i still don’t quite follow,do you want to keep part of the previous iteration?

Sub1 gets baked. A partial selection of Sub1 is mo
dified and replaces part of Sub1 as Sub2? But currently all of Sub1 is replaced with Sub2.

yes, i want to know if there is a mechanism to remove outputs from the garbage collection that occurs in every grasshopper cycle.

like in grasshopper - when you bake an output, it is no longer modified by any component.

an absolutely filthy hack:

Here is a rough workflow, something like this might work. Requires Revit Filters based on parameter then referenced in a Graphical Element. (16.4 KB) (1.4 MB) (revit 2019 blank file with filters created)

change param

push toggle, refresh

So as long as the filters were setup a user could select the desired area, select sub param, do GH adjustments and bake, leaving sub1, sub2 intact, adding sub3

Hey @Rickson - sorry for the late reply. But this is an epic test - much appreciated.

I also found a way to make this work without 1. making filters 2. closing and reopening gh

If I unpin the elements, that seems to break the binding and allows multiple ‘bakes’

Ultimately, this Rhino Inside test has made we just want to understand how all of this is being handled on the backend. Ideally, we could ‘bake’ things without having a user build up infrastructure (filters) beforehand or have to right click an output.

I feel like the larger discussion of the GH loop, Revit Database and insertion would be tackled in


Yes, unpinning right now does break the bond with Rhino.Inside. That probably will always be true, but we are also working on a more official Binding scheme that should allow binding across multiple sessions. Once we get that prototyped we will let everyone play with it and also start filling out the docs.