Modifying wall compound structure layers via api

Modifying wall compound structure layers via api

Anonymous
Not applicable
1,524 Views
1 Reply
Message 1 of 2

Modifying wall compound structure layers via api

Anonymous
Not applicable
Hi,

I am having trouble trying to modify the compound structure of a wall via the api. The 'CompoundStructure' class allows us to read all of the properties of the layers in a wall as well as modify the properties of existing layers. My problem is how do i Add a layer to the compoundstructure layer array?
The 'CompundStructureLayerArray' has methods for append,insert and clear but if i call any of them i get the message 'Specified method is not supported". Does this functionality exist yet or is their some special way in which it must be used.

Any help would be appreciated. Thanks
0 Likes
1,525 Views
1 Reply
Reply (1)
Message 2 of 2

arvind.maurya37
Contributor
Contributor

hii

IList<Autodesk.Revit.DB.CompoundStructureLayer> csl = new List<Autodesk.Revit.DB.CompoundStructureLayer>();

CompoundStructure cs = CompoundStructure.CreateSimpleCompoundStructure(csl);
                    cs.SetNumberOfShellLayers(ShellLayerType.Exterior, firstCoreLayerIndex);
                    cs.SetNumberOfShellLayers(ShellLayerType.Interior, lastCorelayerIndex);

                    if (cs.IsValid(dbDoc, out IDictionary<int, CompoundStructureError> errMap, out IDictionary<int, int> twoLayerErrorMap))
                    {
                        wallType.SetCompoundStructure(cs);
                    }
0 Likes