My company has Views grouped via a discipline then subset along with family and type (Please see Example A.) so it was a bit of surprised when I went into the AllViews Sample and it listed much differently than what the view originally shown (see Example B.) versus what AllViews Sample had showed (see Example C) until I took off the formatting.
So in my quest to create a plugin that mirrors the Project Browser - how may I go into the Revit API to determine what the grouping, sorting settings are? Then once that is determined what is the best way to take the listing of all the views and then apply that via a tree view? I think the closest sample that can get me started is Revit 2014 SDK - Samples - All Views - but there doesn't seem to be anything on the formatting of the view structure within that code sample.
Sorry I cannot help. It seems like you would need to be able to get to the Browser object and its filter settings. Maybe the reason for your idea is mainly to provide flexibility and quick convenience not present in the Browser, but if you had access to the Browser object and its filter settings then why not control the Browser as you need it with new settings on the fly instead of using existing settings to build a new Browser. Looking at your last image and assuming it is the early fleshing out of a sheet creation tool I wonder how you plan to get around the manual placement tasks required for sheet composition and also the book keeping task of which views are already used. The standard Browser has all of those capabilities built into it. It just needs a convenient way to drive it for specific tasks, like the one I am thinking you are looking for. Your customization would not look like a new Browser. Instead it would be sets of controls that instantly manipulate how the Revit browser organizes the views needed for sheet composition in addition to having some task controls and settings.
I am not aware of any functionality at all provided by the Revit API to determine any special ordering of views.
You would have to use other generic properties and relationships to set up the ordering you desire.
I cannot say whether the API provides all the information required to mirror the constellation displayed in the Project Browser.
I hope this help.
Word of warning here:
Replicating the current Revit Project Browser is a huge development project. I know cause I've been there. It is possible, but I thought it may take a month? Well it took 6 lol.
For a video of what I achived click on this link
I'm in agreement with everything you've said except up to the point - ....
"this might be two datagridviews"
I'm perfectly fine with one datagrid view with selected checkboxes for each row that display the name of each view.
Probably a combo box above it to filter the types of views.... Floor Plan, 3D View, Building Section, Schedule, Panel Schedule,
Hit a button and it would go and create the new views based on what's in the datagrid.
Everything I want to do afterwards like a textbox for prefix and suffix - I can figure out.
I just need to get started with populating the datagrid with the views as a sample and a way to FILTER it.
That's the big thing for me - how do I filter it? Not even the AllViews Samples shows how I may do that.
You've created a masterful, beautiful Revit Project Browser plugin - and has taken it way farther then I could have even dreamed of.
I just wanted somebody to update the current AllViews sample to at least have filtering so I could farther study on what I needed to do in this instance.
Is the filtering based on what's in the view name or another property for the view?
Thank you for your helpful replies thus far. I guess I should have said instead of formatting the Project Browser I should have used the word filter.