Cut wall with wall (embedded wall) with revit api

Cut wall with wall (embedded wall) with revit api

c.ooijevaar
Contributor Contributor
2,201 Views
7 Replies
Message 1 of 8

Cut wall with wall (embedded wall) with revit api

c.ooijevaar
Contributor
Contributor

Hi all,

 

ive been searching how to cut out a wall from another one with the revit api. i believe its not working with the solidsolidcututils class?? 

can anyone help me with this or re-direct me to a post where this subject is covered (couldnt find it).

 

Thanks,

Coen

0 Likes
2,202 Views
7 Replies
Replies (7)
Message 2 of 8

BenoitE&A
Collaborator
Collaborator

Hey,

Can you explain why you ask the question? Cause either the wall is already in the model either you create it and you need it to stop when another wall is found...

I would say: if you create it, you probably have a Geometry to start with (something like a LocationLine) and you can find the intersection of this location line with the other walls of the plan ; however if the wall is already there you can find its intersection with other walls using the same solution (location line) or Ray Intersection (but I really prefer the first, which looks much simpler to me).


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
0 Likes
Message 3 of 8

c.ooijevaar
Contributor
Contributor

Hey Benoit, 

 

thanks for your reply

 

My goal is to create a cut tool that is able to cut multiple objects at the same time. for example one wall with 50 loaded void families or maybe 30 walls. 

 

in case its a wall with another wall i want the same effect as when you use the original revit cut tool and cut two walls with eachother. 

0 Likes
Message 4 of 8

Moustafa_K
Collaborator
Collaborator

I believe you need to join the embedded walls so the cut family apply its effect. try this via UI first,

1. create a wall.

2. add the void cut family

3. create the 2nd wall

4. Join the 2 walls.

 

hope that helps

 

I tried replying on your PM but something is wrong, keeps saying i reached my limits of PM!!!

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
0 Likes
Message 5 of 8

c.ooijevaar
Contributor
Contributor

Hey Mostafa,

 

Thanks for your reply.

I think were youre aiming at is a situation were a costum family is used with a void object. but in my case i just want to make a cutout with a wall from another. cut wall with wall.gifWhy do we want to automate this throughout the api? we got a lot of brickwork with setbacks. like:brickwork.JPG

we like this method of drawing two walls becouse its easy as a drawing method for everyone to use and the setback is also automatically classified as a wall. 

0 Likes
Message 6 of 8

Moustafa_K
Collaborator
Collaborator

Aha now i understand what you mean. My suggestion is to use curtain walls. And change the panel to block work, and then you can select the one you need it embedded and change it to the respected type.

 

Honestly, i haven't tried that via api. But this is how I used to do it while designing.

Once I reach my computer I will try that.

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
Message 7 of 8

c.ooijevaar
Contributor
Contributor

Hey Mostafa, 

 

Did you find time to look into this topic? i didnt find a solution yet unfortunatly.

 

greets coen

0 Likes
Message 8 of 8

Moustafa_K
Collaborator
Collaborator

First Please accept my apology. I was overloaded the last month. here you go

as I explained before you need to create Curtainwall with the grids, that identifies the Panel location, where this panel will be changed to wall type.

 

see the below example and let me know if this helps.

//you need to get your wall Type Id
// Assuming your embeded wall type Id is 198367					
var walltype = new FilteredElementCollector(doc).WhereElementIsElementType().OfClass(typeof(WallType)).Where(o => o.Id.IntegerValue == 198367).First() as WallType;

//Select the Panel you want to change
//hit Tab Key to navigate Selections for subelements 
Reference refsel = uiDoc.Selection.PickObject(ObjectType.Subelement, "Select Curtain Wall");
	var _panel = doc.GetElement(refsel.ElementId);
					 
//open document transacation and change Curtain Panel walltype to the one you prefer.
using (Transaction trans = new Transaction(doc))
{
	trans.Start("Change Type");
	_panel.ChangeTypeId(walltype.Id);
	trans.Commit();
}

 

 

 

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
0 Likes