When I generate a Revit element in the ghpython script using the Revit API, that element automatically belongs to Revit. When I create the same element again, for example to change the type of the wall, the ghpython script creates another wall that clashes with the previous one.
To avoid this problem in Dynamo, you write: wall.ToDSType(True), and then, the Revit wall belong to Dynamo, so when I change this wall in Dynamo I regenerate the previous one so that there are not two walls generated.
Is there something like this in ghpython or some kind of workaround? It should be a workaround because the rhino-inside components have solved this problem, but although I take a look at the code in github, I don’t find where this problem is solved. Here is the link to the github wall.ByCurve component:
That is called as Element Binding and it is solved in Native Components at the moment. As far as I know, team is developing an SDK and I think we can assume that we will have this ability once that is released. But we don’t have it at the moment. One workaround is deleting old object and recreating a new one programmatically.