Combine model (Clashes) element to one assembly group

Hi All,

We are trying to combine elements into a model in Revit. From the Dynamo, we got the logic that worked below snap.

Similarly, we want to develop C# code as a plugin. but tried many options. We are stuck with combine, which is not working properly. could you please have anyone provide the suggestions?

result we are looking below snap, for builders work purposes.
image2

Thanks

The community can’t help too much if you don’t post your code. But I can try to offer some guidance here based on some really broad assumptions.

Since you are writing an add-in it is a best practice to reduce the level of technical debt your tool produces by minimizing the dependencies. And as Revit’s API has the capabilities you need to do what you outlined above, I am assuming you will be using none of the Dynamo API. I am also going to assume you understand the basics of the API and C# code.

So assuming you have Revit Solid objects, the solids can be unioned via the BooleanOperationUtils class, likely they method here: ExecuteBooleanOperation Method

You might want the boolean operation to modify the original solid though, in which case use that adjacent method instead.