Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modifying wall compound structure layers via api

1 REPLY 1
Reply
Message 1 of 2
millbor
1187 Views, 1 Reply

Modifying wall compound structure layers via api

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
1 REPLY 1
Message 2 of 2
arvind.maurya37
in reply to: millbor

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);
                    }

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community