【Revit】revit 二次开发如何控制门方向

I want to know two properties of a door in Revit model.
   Which wall side of a door is opened? 
   Which side of a door is hinged to wall?

Can you explain how to find these information via Revit API?

Two properties of FamilyInstance can be used to find out a door opening direction, and the side of the hinge: 
FamilyFacingFlipped returns the wall direction, and FamilyInstance.HandFlipped returns the hinge side.
Both properties returns bool value. The following section will explain the meaning of the bool value First, we need to know which side of a wall is internal/external side. By default, when drawing a wall,

in the direction from the start point to the end point, the left side of the direction is the wall's external side.
Of cause, the other side is the internal side. When a wall is selected,
there is a small blue "Change wall
' orientation" flip control close to wall.
The side of this control is the external side of the wall. See below image.
There is a blue flip control under the dimension text, so the upper side is the external side.
Users can click this control to swap wall internal/external side.
If FamilyInstance.FacingFlipped == False, the door is opened to external side of the wall. See door 11 and 15 in the image.
If the value is true, the door is open to internal of the wall. See door 14 and 16. If FamilyInstance.HandFlipped == False, the hinge of the door is in the right side when people stand in the internal side of the wall and face door.
See door 11 and 14. If the value is true, the hinge is in the left side when people stand in the internal side of the wall and face door.
See door 15 and 16.The two properties' value of the doors are listed in the image. Facing flipped represents FamilyInstance.FacingFlipped,
and Hand flipped represents FamilyInstance.HandFlipped.

谷歌翻译:

我想知道Revit模型中门的两个属性。
   门的哪一面打开?
   门的哪一侧铰接在墙上?

您能解释一下如何通过Revit API查找这些信息吗?

FamilyInstance的两个属性可用于找出门的打开方向,以及铰链的侧面:FamilyFacingFlipped返回壁的方向,
FamilyInstance.HandFlipped返回铰链的侧面。这两个属性均返回布尔值。下一节将解释布尔值的含义 首先,我们需要知道墙的哪一侧是内部
/外部。默认情况下,在绘制墙时,在从起点到终点的方向上,方向的左侧是墙的外侧。
当然,另一面是内侧。
选择墙后,靠近墙的地方会有一个小的蓝色“更改墙的方向”翻转控件。此控件的一侧是墙的外侧。见下图。
尺寸文本下方有一个蓝色的翻转控件,因此上侧是外侧。用户可以单击此控件来交换墙的内部/外部。 如果FamilyInstance.FacingFlipped == False,则将门打开到墙的外侧。请参阅图像中的门11和15。
如果值为true,则门向墙壁的内部敞开。参见门14和16。 如果FamilyInstance.HandFlipped
== False,则当人们站在墙面门的内侧时,门的铰链在右侧。请参阅门11和14。
如果该值为true,则当人们站在墙壁和门的内侧时,铰链位于左侧。参见门15和16。图像中列出了门的两个属性值。
翻转的面表示FamilyInstance.FacingFlipped,而翻转的面表示FamilyInstance.HandFlipped。

门

原文地址:https://adndevblog.typepad.com/aec/2012/06/get-doors-open-direction-and-hinge-side.html

原文地址:https://www.cnblogs.com/mqxs/p/13353190.html