Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am fairly new to coding and the Revit API and I'm trying to write what should be a pretty basic Macro in C# to take the built in parameter of wall width and write it to a taggable shared parameter. I have been struggling to make this work. This seems so simple and I can make it work in Dynamo without an issue. I've tried getting the built in parameter, tried it as an element. i'm really struggling with what seems to be fairly easy. any pointers would be appreciated.
//collect all wall types
FilteredElementCollector wallTypeColl = new FilteredElementCollector(doc);
wallTypeColl.OfClass(typeof(WallType));
//get basic walls
foreach(WallType wt in wallTypeColl)
{
dblWidth=wt.Width;
wallsBasic.Add(dblWidth.ToString());
wt.LookupParameter(wallThickness).Set(dblWidth);
}
Solved! Go to Solution.
