I have create some new doors on a wall with api NewFamilyInstance function. The doors are created but the wall is not cut through on the door location, so it looks like door and wall are overlapped. As soon as I manually change the hand of a door, then the wall will be cut on that door location.
commandData.Application.ActiveUIDocument.Document.Create.NewFamilyInstance(doorStartPointOnWallFace, doorSymbol, wall, wallLevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural);
Is there any property of wall need to be set from api for placing door/window?
Solved! Go to Solution.
Solved by Revitalizer. Go to Solution.
I just tried creating a door using the same overload you are using and it was created correctly with the host wall being cut as expected. So I don't think it's a code / API issue.
In your screenshot, the door to the upper-right looks like it is cutting the wall, but it appears that some of the wall texture is showing through due to z-fighting with the co-planar door leaf. Maybe the door family's opening cut is not set to be transparent in 3D? Does a different door family work?
Hi,
you could try to flip its direction twice, after inserting.
famInst.flipFacing();
doc.Regenerate();
famInst.flipFacing();
doc.Regenerate();
With famInst being your created door FamilyInstance and doc your Document.
This way, you would just simulate what you are doing in the GUI to create door cuts.
Best regards,
Revitalizer
Can't find what you're looking for? Ask the community or share your knowledge.