Create doors but not cutting through wall

Create doors but not cutting through wall

aditazz
Contributor Contributor
1,676 Views
3 Replies
Message 1 of 4

Create doors but not cutting through wall

aditazz
Contributor
Contributor

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?

0 Likes
Accepted solutions (1)
1,677 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

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?

 

0 Likes
Message 3 of 4

Revitalizer
Advisor
Advisor
Accepted solution

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




Rudolf Honke
Software Developer
Mensch und Maschine





Message 4 of 4

aditazz
Contributor
Contributor

thanks for replying back,

 

doc.Regenerate() makes it work.