- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am new to programming and even newer to the Revit API however as I understand it parameter data is stored in several places within the Revit database?
By utilising BindingMap I have created a list of Project Parameters unfortunately this does not contain all the related information I require.
BindingMap bMap = doc.ParameterBindings; DefinitionBindingMapIterator mapIterator = bMap.ForwardIterator(); mapIterator.Reset(); string s = ""; List<string> list = new List<string>(); while (mapIterator.MoveNext()) { Definition def =null; def = mapIterator.Key; list.Add(def.Name); ListNumber = list.Count; }
By creating a collection utilising FilteredElementCollector(doc)WhereElementIsNotElementType I have a much larger list of data that contains all the "project parameters" as well as much more element data, however this collection does contain and the additional data I require (Id and GUID).
var collector = new FilteredElementCollector(doc).WhereElementIsNotElementType(); //Cycle through all elements in the scene, identify their element ID and GUID. foreach (Element elem in collector) { int elemId = elem.Id.IntegerValue; string elemName = elem.Name.ToString(); Guid elemGuid = Autodesk.Revit.DB.ExportUtils.GetExportId(elem.Document, elem.Id); }
Is there any way of utilising the list from the Binding Map to filter or extract the required additional data from the Filtered collection?
Or is there a much simpler method of getting this additional data?
Any help would be much appreciated.
Product: Revit 2016
Programming Language: C#
Solved! Go to Solution.