寻找项目中对应的墙体族类型(WallType):根据RevitAPI接口,创建墙体的所需的参数如下,其中最难寻找的为墙体族类型的ID(wallTypeId);本代码中采用了两种方式来寻找墙体族类型:1)“AutoBuilding_wall.FindWallType(doc, wallTypeName)”:通过给定的墙类型名称来定位项目中的墙体族类型;2)“AutoBuilding_wall.CreateFami...
CreateFamilySymbol:输入类别名称、族名称、族类型名称,在项目中先判断是否已存在输入的族类型名称,如果不存在则新建新的墙体族类型,如果存在,则直接获取。 publicstaticWallTypeCreateFamilySymbol(Documentdoc,stringcategoryName,stringfamilyName,stringnewFamilySymbolName){Transactiontra=newTransaction(doc,"创建族类型");...
代码语言:javascript 复制 FilteredElementCollector fill=newFilteredElementCollector(doc);fill.OfClass(typeof(WallType));ElementId idd=null;//记录墙的IDforeach(WallType wainfill)//查找墙的类型{if(wa.FamilyName.Contains("基本墙")&&wa.Width*304.8==200)//找到基本墙且墙宽200{idd=wa.Id;//记录墙...
Revit二开构造函数-CreateFamilySymbol(输入类别名称、族名称、族类型名称,创建族类型) CreateFamilySymbol:输入类别名称、族名称、族类型名称,在项目中先判断是否已存在输入的族类型名称,如果不存在则新建新的墙体族类型,如果存在,则直接获取。publicstaticWallTypeCreateFamilySymbol(Documentdoc,stringcateg… ...
系统族可以通过内参遍历,遍历出来是个FamilySymbol 喷头属于系统族,但不能通过NewDuct();类似这样的方法布置。必须使用NewFamilyInstance() xml html it 转载 mob604756f47778 2013-10-28 15:49:00 162阅读 2评论 Revit API取得系统族普通族几何信息的方法 系统族,可以直接转化为对应的类(Wall,Duct)然后取得...
}foreach(WallType iteminfamilySymbolList) {if(item.Name == wallTypeName) { TaskDialog.Show("创建墙","墙类型已经存在"); transaction.Commit(); } } newWallType = baseWallType.Duplicate(wallTypeName)asWallType; doc.Regenerate();//改变厚度CompoundStructure wallTypeStructure = newWallType.GetCompo...
foreach (WallType wa in fill)//查找墙的类型 { if (wa.FamilyName.Contains("基本墙")&&wa.Width*304.8==200)//找到基本墙且墙宽200 { idd = wa.Id;//记录墙的类型 } } IList<Curve> cu = new List<Curve>();//墙的线条 cu.Add(Line.CreateBound(new XYZ(100, 20, 0), new XYZ(100,...
Maybe you know the power of Revit software’s Family Editor but you’ve avoided it or it has intimidated you until now. Wait no more. This article will introduce you to the basics of Family Editor.
Revit has many pre-installed component families, but users can create new ones as needed. The software has a feature called the Revit Family Manager, where family files (RFA files) can be created from zero. The Family Editor tools are used to modify existing elements, and create new ones ...
分别通过doc.LoadFamily(file, out family);加载族,通过doc.Create.NewFamilyInstance创建一个族实例。 /// /// 创建一个门族的案例 /// /// /// public void CreatDoorInstance(Document doc, string doorTypeName = "0762 x 2032 mm") { Family...