2024-07-11
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
I wrote this before, but I feel bad for rambling on and on. I want to find some emoticons to make it more interesting, but I can't find any suitable ones, or it's time-consuming and laborious and I'm not satisfied, and I can't make emoticons myself, so forget it.
Secondly, I used to list some of the class members after reading the meter, but if I wrote it in full, it would be too long and verbose, and I wouldn’t even want to read it. If I only wrote it selectively, I might miss some useful ones, so I won’t list it.
So, let’s stop talking nonsense and get straight to the point.
Family
(family), directly derived fromElement
In Revit, most elements are families. Models such as walls, beams, and columns are families, and drawing annotations such as lengths, angles, and diameters are also families. Of course, there are also some that are not families, such asDirectShape
, it's just a model.
According to the editing mode, families can be divided into three types: system families, built-in families, and loadable families. Since I don't know much about built-in groups, I won't go into details. You can check it out yourself.
FamilySymbol
(Family type) is a part of a family. For example, a door can have its width, height, and door handle position changed by adjusting parameters. However, only a few sizes of doors are actually used, so some parameters can be preset. This preset is a family type. A family can have many types.
FamilyInstance
(Family instance), to put it simply, is an instance of a family.
However, the family instance class,SpecificallyLoadable families (families created by users, represented by.rfa
Format file) instance. An instance of a system family isWall
、Cloumn
This type of family is defined and implemented within Revit.
To obtain the general family instance, you can follow the previous "Filter"conduct.
To obtain the family name, please refer to another articleRevit gets the family name of the element, or directly use the following code.
// 扩展方法
public static string GetFamilyName(this Element element)
{
Parameter parameter = element.GetParameter(BuiltInParameter.ELEM_FAMILY_PARAM); // GetParameter也是扩展方法,自带的返回是一个List
string familyName = parameter.AsValueString();
return familyName;
}