...
newWallThknss = wtp.Duplicate("MW 0.2") as WallType;
CompoundStructure cs = newWallThknss.GetCompoundStructure();
double layerWidth = 0.2;
int layerIndex = cs.GetFirstCoreLayerIndex();
IList<CompoundStructureLayer> cslayers = cs.GetLayers();
foreach (CompoundStructureLayer csl in cslayers) {
cs.SetLayerWidth(layerIndex, layerWidth);
layerIndex++;
}
newWallThknss.SetCompoundStructure(cs);