
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been working on an exporter Addin project to export parameters (in .csv format) and obj of Revit elements. The export procedure chooses what element to export by filtering whether an element has the parameter whose name is 'Installation Sequence,' which doesn't exist in structure families (especially Precast Concrete families of Structural Columns) originally.
I've researched Revit document how to add a new parameter, and here's how I do it:
1. Load a family
2. Enter the menu by [Edit Family] -> [Family Types] (In the Properties tab of Create ribbon) -> [New parameter]
3. Set new parameter 'Installation Sequence.' Its specification is in the screenshot:
In the source code of the exporter Addin, the filter for this parameter is:
IList<Element> filtered = new FilteredElementCollector(doc)
.OfClass(typeof(FamilyInstance))
.Where(a => a.LookupParameter("Installation Sequence")?.AsInteger() >= 0)
.ToList();
I've checked (and confirmed) it does export .obj and parameters properly.
I want to know:
1. In my situation, is it okay to set the parameter specification the way I'm using it?
2. Is there another (perhaps more practical) way to add parameters?
If you have any uncertainty, please let me know.
Solved! Go to Solution.