Element binding using code using c# custom node it works for OOTB what about c# custom node?

See image below.
After reading this post Rhino - Revit connection lost between sessions
is there a way to activate element binding?
Please give some guidance on this. I do know element binding exists because some OOTB revit grasshopper nodes will use element binding…
so what is the method to activate it in c#? am i over simplifying it?
Thanks

We are working on an element binding scheme. I am not sure when it will be ready to test. Hopefully sooner then later. So, I would hold of on anything extravagant.

Currently the only workaround is to set a common parameter with an ID of some type and then have specific components react to that.

2 Likes

Hi Scott,

Any news on the element binding scheme?

No, we are still working on that. I would hope we have something soon.

hello @scottd,
thanks for the reply.
Is there an example for this workaround? → (set a common parameter with an ID of some type and then have specific components react to that)
in my case preferably in python, altough C# would be ok and suits better the post :slight_smile:
thanks in advance!

Keep an eye out for the imminent release of the sdk and documentation for using Element Tracking in scripts and custom components.

1 Like

Hi @Japhy / @scottd / McNeel Team,
Has there been any update on Element binding for C#?

Regards

We won’t be breaking the SDK and releasing Rhino.Inside.Revit 2.0 until Revit changes to .Net 7, which is where Element Tracking will be scriptable.

There is a plan to add in pseudo element binding (replace only) to the existing version to help with this request. There are fundamental integrations for GH1 components that need to happen first, so no firm dates given.

1 Like

Thanks for the quick response @Japhy. I just read about Revit getting an upgrade soon to .Net 6 so .Net 7 might still looks like a long way to go.
The replace only option would be great for now and its understandable there good amount of work to be done. Looking forward to its release. thanks

That was my impression too (Revit moving to .net 6) now its .Net 7.

https://adndevblog.typepad.com/aec/2023/11/revit-api-is-moving-to-net-core-70.html

There are a few moving parts here, so do note that the actual updates may unfold slightly differently.

Why do we need to wait for net 7 in revit to get element binding fir custom components?

It seems since it was implemented for OOTB RIR components then it would be possible for say c#?

Could it be as simple as reusing the open source code from RIR OOTB to custom c# components? Or am I oversimplifying it?
Thx

It’s a rough schedule, the idea being that it would be a good time to make a big change as well. There isn’t anything technical in regard to .Net 7, older versions of Revit will still be running in 4.8.

Ok we will wait for the updates.
I was just asking since OOTB RIR components use element binding that is coded in C# per github source files

Why can’t we do it using C# components?

Correct, there isn’t anything preventing an advanced user to follow the pattern, but its not currently exposed in a simple manner in the API for easily use in scripts.

https://www.rhino3d.com/inside/revit/api/1.0/2022/html/R_Project_RhinoInside_Revit_API.htm