I want to create a schedule that will show which views are visible within a Revit 2012-2013 plan view. Does anyone know how to extract this data from the revit model to a schedule or external data file?
This can be done via Revit API. You can retrieve the list of the views visible in a view via the following code fragment.
<code>
FilteredElementCollector collector = new FilteredElementCollector(doc,doc.ActiveView.Id);
collector.OfCategory(BuiltInCategory.OST_Viewers);
string elementMessage = null;
foreach(Element elem in collector)
{
if(elem.Category != null)
elementMessage += elem.Name + ";; category=" + elem.Category.Name + "\r\n";
}
TaskDialog.Show("number of elemetn",collector.ToElementIds().Count.ToString() + "\r\n" + elementMessage);
<code>
You can write the list of the view visible int the specified view to external data source, for example, txt file, excel spreadsheet via the non-Revit APIs.
With regard to create a Revit Schedule, I didn't try that for this question. I think it should be possible to create for the visible views in the plan view. Revit 2013 exposed the API to create schedule, you can set filter for the schedule.
I am not quite sure I got your idea. Would you please clarifiy it in detail? Thanks.
Yes, you can get the sheet number and reference sheet and detail # from the view sheet object's parameter value. The way to get these parameter value is first get the target parameter object. Then read the parameter value from those target parameter.