Replicate Built-In component behavior with Python script


I have quite a few python components in my RiR Gh script that are used to generate objects that can’t be created using the built-in components (like creating a roof, with 4 lines, that slopes on only 2 of those sides). Is it possible to have them behave like the built-in components that create objects? The behavior I’m looking for is the pinning and updateable nature that the built-in components have. I assume that it isn’t just the fact that they are pinned that makes them behave like this? Right now I have to attach a boolean switch to these python components because once they run, they permanently ‘bake’ the objects into the Revit scene. My workflow is boolean switch on to create the objects, then immediately turn it off to ensure that transactions don’t keep running over and over again (this has crashed on me many times), and then if I change anything in the script I can just delete those objects out of the Revit scene and create them again.


@eirannejad Do you know if this is possible? Or am I just going about it in the wrong way? Thanks

We are working on Element Binding API that would make all of this trivial and possible. What you are doing is a good workaround for now until we have the official v1.0

Sounds good! I will look forward to it