I work in C# and this works in 2011:
Code:
Autodesk.Revit.DB.Document m_doc = m_app.ActiveUIDocument.Document;
ElementClassFilter vfilter = new ElementClassFilter(typeof(ViewDrafting));
FilteredElementCollector vcollector = new FilteredElementCollector(m_doc);
IList<Element> views = vcollector.WherePasses(vfilter).ToElements();
Here is my attempt to convert the code to VB:
Code:
Dim app As UIApplication = commandData.Application
Dim doc As Document = app.ActiveUIDocument.Document
Dim filterview As New ElementClassFilter(GetType(ViewDrafting))
Dim vcollector As New FilteredElementCollector(doc)
Dim views As IList(Of Element) = vcollector.WherePasses(filterview).ToElements()