1)I have a WallType and need to Change the compound structure of 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);
}
}
The walltype compound structure is updated properly
But,CompoundStructureLayer.LayerId is the read-only field we cannot update it for all the CompoundStructureLayer's LayerId I get is like 0
2) when i read the compoundStructure form WallType it gives LayerID as at 0 th index as 0,
at 1 st index as 1
at 2nd inndex as 2... and so on
is there any way to Update The layerID of compound Structure? is there any workaround to achive that.