1)我有一个WallType,需要更改WallType的复合结构。
private void updateCompoundStructure(WallType wT)
{
IList<Autodesk.Revit.DB.CompoundStructureLayer> csl = new List<Autodesk.Revit.DB.CompoundStructureLayer>();
csl.Add(new Autodesk.Revit.DB.CompoundStructureLayer()
{
DeckEmbeddingType = deck,
DeckProfileId = profileId,
Function = structureFunction,
LayerCapFlag = item.LayerCapFlag,
MaterialId = materialId,
Width = item.Thickness
});
CompoundStructure cs = CompoundStructure.CreateSimpleCompoundStructure(csl);
if (cs.IsValid(dbDoc, out IDictionary<int, CompoundStructureError> errMap, out IDictionary<int, int> twoLayerErrorMap))
{
wallType.SetCompoundStructure(cs);
}
}
壁式复合结构已正确更新
但是,CompoundStructureLayer.LayerId是只读字段,我们无法更新它 我得到的所有CompoundStructureLayer的LayerId都像0
2)当我从wallType读取compoundStructure时,它给出了第0个索引处的LayerID为0,
第一个索引为1
在第二个索引上为2 ...依此类推
有什么方法可以更新复合结构的layerID? 有没有解决方法可以实现?