CreateFamilySymbol:输入类别名称、族名称、族类型名称,在项目中先判断是否已存在输入的族类型名称,如果不存在则新建新的墙体族类型,如果存在,则直接获取。 publicstaticWallTypeCreateFamilySymbol(Documentdoc,stringcategoryName,stringfamilyName,stringnewFamilySymbolName){Transactiontra=newTransaction(doc,"创建族类型");...
FamilySymbol winType= windowTypes.First()asFamilySymbol;//put 3 windows in the walldoublex =2, y =2, z =2;for(inti =0; i <3; i++) { XYZ location=newXYZ(x, y, z); FamilyInstance instance=document.Create.NewFamilyInstance(location, winType, newWall, StructuralType.NonStructural); x...
1. 创建墙体(Create Wall):在Revit中,墙体是建筑模型的基本元素之一。要创建一个墙体,您可以在资源浏览器中选择“墙体”工具,然后在视图区域中拖动鼠标绘制墙体的轮廓。 2. 创建楼层(Create Floor):楼层是建筑模型的另一个重要元素。要创建一个楼层,您可以在资源浏览器中选择“楼板”工具,在视图区域中拖动鼠标绘制...
系统族可以通过内参遍历,遍历出来是个FamilySymbol 喷头属于系统族,但不能通过NewDuct();类似这样的方法布置。必须使用NewFamilyInstance() xml html it 转载 mob604756f47778 2013-10-28 15:49:00 165阅读 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...
“AutoBuilding_wall.CreateFamilySymbol(doc, categoryName, familyName, familySymbolName)”:通过自定义的墙类型名称在项目中自己创建新的墙体族类型;但同时这样也会带来新的问题,即墙体族类型的重复创建报错问题,此问题目前已解决,并以写入“AutoBuilding_wall.CreateFamilySymbol”的方法中,上述两种方法均为自定义的...
FilteredElementCollector fil=newFilteredElementCollector(doc);fil.OfClass(typeof(Level));foreach(Level llinfil){//在这我们需要判断一下要在那一层创建我们需要的墙体if(ll.Name.Contains("一层")){ElementId id=newElementId(ll.Id.IntegerValue);Wall wa=Wall.Create(doc,Line.CreateBound(newXYZ(0,0...
Family Creation Steps 1. Selecting a family template: it can be wall-based, ceiling-based, floor-based, etc. 2. Defining the parameters 3. Sketching the model geometry 4. Defining the family subcategories 5. Setting visibility rules 6. Creating family types using different parametersLooking for...
wallLine=Line.CreateBound(start,end);//画一条直线foreach(Level llinfil)//找标高{if(ll.Name.Contains("一层"))//找到一层标高{le=ll;//记录标高wid=newElementId(ll.Id.IntegerValue);//记录标高ID}}Wall newWall=Wall.Create(doc,wallLine,wid,true);//画墙FamilyInstance fa=doc.Create.New...
A customer has a headache to create family instance on wall, he tried several combinations of Document.Create.NewFamilyInstance but got nothing. Here is what he wants, place a light fixture on wall: I found when we place them by manual, it is always on a face of the wall, so we can...