revit api 内置族类型 walltype
复制墙类型
Wall wall = RevitDoc.GetElement(new ElementId(185521)) as Wall;
WallType wallType = wall.WallType;
ElementType duplicatedWallType = wallType.Duplicate(wallType.Name + " (duplicated)");
复合结构的compoundlayer
Reference refe1 = commandData.Application.ActiveUIDocument.Selection.PickObject(ObjectType.Element);ElementId id3 = new ElementId(339288);Wall wall = doc.GetElement(id3) as Wall;CompoundStructure cs1 = wall.WallType.GetCompoundStructure();IList<CompoundStructureLayer> lstLayers = cs1.GetLayers();//foreach (CompoundStructureLayer layer in lstLayers)//{// string layerInfo = $"层名称: {layer.Function}, 层厚度: {layer.Width * 304.8} mm+{layer.LayerId}"; // 转换为毫米显示// TaskDialog.Show("墙类型复合结构层信息", layerInfo);//}//int ii9 = cs.GetFirstCoreLayerIndex();//TaskDialog.Show("提示", "第一个核心层索引11:" + ii9.ToString());//int ii8 = cs.GetLastCoreLayerIndex();//TaskDialog.Show("提示", "第二个核心层索引22:" + ii8.ToString());//int ui8 = cs.GetCoreBoundaryLayerIndex(ShellLayerType.Interior);//TaskDialog.Show("提示", "核心内层边界索引:" + ui8.ToString());//int ui88 = cs.GetCoreBoundaryLayerIndex(ShellLayerType.Exterior);//TaskDialog.Show("提示", "核心外层边界索引:" + ui88.ToString());Transaction ts = new Transaction(doc, "BIM");ts.Start();CompoundStructureLayer layer = new CompoundStructureLayer(300 / 304.8, MaterialFunctionAssignment.Structure, material.Id);CompoundStructureLayer layer1 = new CompoundStructureLayer(200 / 304.8, MaterialFunctionAssignment.Structure, material.Id);CompoundStructureLayer layer2 = new CompoundStructureLayer(100 / 304.8, MaterialFunctionAssignment.Structure, material.Id);IList<CompoundStructureLayer> il1 = new List<CompoundStructureLayer> { layer, layer1, layer2 };cs.SetLayers(il1);cs.DeleteLayer(0);
cs.SetNumberOfShellLayers(ShellLayerType.Exterior, 1);
cs.SetLayerFunction(0, MaterialFunctionAssignment.Finish1);
cs.GetLayers()[0].Width = 50 / 304.8;wall.WallType.SetCompoundStructure(cs);ts.Commit();
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/951237.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!