Walls are not automatically joined

Walls are not automatically joined

shehab_fekry
Enthusiast Enthusiast
421 Views
1 Reply
Message 1 of 2

Walls are not automatically joined

shehab_fekry
Enthusiast
Enthusiast

If I draw two simple walls with this code 

var firstCurve = Line.CreateBound(new XYZ(0, 0, 0), new XYZ(5, 0, 0));
var secondCurve = Line.CreateBound(new XYZ(5, 0, 0), new XYZ(10, 0, 0));
Wall.Create(doc, firstCurve, new RDocument(doc).Levels.First().Id, false);
Wall.Create(doc, secondCurve, new RDocument(doc).Levels.First().Id, false);

the walls are not automatically joined into one wall even that they have the same parameters and they are two separate walls 

shehab_fekry_0-1700127222090.png

the same two walls if they are drawn manually in Revit they are joined into one wall as shown in figure 

shehab_fekry_1-1700127294103.png

 

of course this example is simple but I'm working on a complex project that creates a wall between two walls .. by using API I get three separate walls but if done using Revit manually I get one equivalent wall only 

 

so I want to know how to handle that case using API I tried to make a small overlap between these walls but it's not working. 

0 Likes
422 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni

Maybe the WallUtils will help?

  

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes