Place a host-based element on a specific face of a wall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I am struggling with an issue for a long time now.
We have some host-based (FamilyPlacementType.OneLevelBasedHosted to be specific) that we need to place on a specific face of a wall.
I tried using all the methods that get a face or a reference to a face but they failed because of the family's placement type:
NewFamilyInstance(Face, XYZ, XYZ, FamilySymbol)
NewFamilyInstance(Reference, XYZ, XYZ, FamilySymbol)
I tried using the following method with a direction but it seems not to work:
NewFamilyInstance(XYZ, FamilySymbol, XYZ, Element, StructuralType)
The interesting part is that I can place the family manually and it can be placed on the side that I desire.
This is how this family works when I place it manually:
And when I try to place it with the API, it is placed in the opposite direction (the lower one):
This is the code I used:
XYZ direction = new XYZ(0,1,0);//I tried all kinds of directions
FamilyInstance instance = doc.Create.NewFamilyInstance(new XYZ(65.5280909618585, 27.0970624218628, 5.10416666666668), voidFamilySymbol, direction, wall, StructuralType.NonStructural);
When I place it manually vs API, I see the following difference between the families:
The family that was placed manually:
The family that was placed via the API:
I tried to flip them but it is not allowed and the operation fails.
Any idea on how to fix that?
Thanks!