We have a need to read from the "Browser Organization" seen in the Revit GUI, but are having difficulty figuring out how to do this with the API.
Essentially, we want our add-in to list/filter/group/sort things for the user the same way the user sees them in the Revit GUI's Project Browser.
We need to support Revit 2013 and Revit 2014, and very soon Revit 2015.
Any assistance with getting this information from Revit is greatly appreciated!
Thanks much.
Hi,
Unfortuantely these features are not exposed to the SDK at this time.
We are sorry for inconvenience and thank you very much for your patience.
Best Regards,
Akira Kudo
Hello. Thank you for this information.
Sometimes I wonder if Autodesk doesn't require the e-mail signatures of their Revit API support team to start with the words:
Unfortunately, the Revit API <fill in the blank>
As I get that message A LOT.
But thanks for the honesty, and the timely response.
Since there are thousands of features in the Revit API, your suggested signature would be actually incorent in many, many cases. 😉
You are right, however; we do not have 100% of exposed functionality in the API. Not that users should care why is that, but it is due the fact the API started about 8 years after Revit was first released and we can only do so much in each release. You may rest asured that we address all requests according to their respective priority. An API for controlling the browser's layout has been on the list quite high, but not high enough yet; I am sorry for that. We also have an request for replacing the browser with a custom one (so you can have one completely unique). We've been looking in that also, It has not made it to 2015 though.
Arnošt Löbel
Sr. Principal Engineer
Autodesk, Revit R&D
I have found this in Revit Platform API Changes and Additions.doc in Revit 2015 SDK
BrowserOrganization API
The new class
•BrowserOrganization
contains settings for grouping, sorting, and filtering of items in the project browser.
New methods
•BrowserOrganization.AreFiltersSatisfied() - Determines if the given element satisfies the filters defined by the browser organization.
•BrowserOrganization.GetFolderItems() - Returns a collection of leaf FolderItemInfo objects each containing the given element Id.
New static Methods
•GetCurrentBrowserOrganizationForViews() - Gets the BrowserOrganization that applies to the Views section of the project browser.
•GetCurrentBrowserOrganizationForSheets() - Gets the BrowserOrganization that applies to the Sheets section of the project browser.
New properties
•SortingOrder - The sorting order if sorting of items is applicable in the browser.
•SortingParameterId - The id of the parameter used to determine the sorting order of items in the browser.
The new class
•FolderItemInfo
contains data for each folder item in the organization settings of the project browser including folder parameter Id and folder name.
New properties
•ElementId -The folder parameter Id.
•Name - The folder name .
Isn't this what you are looking for?
Domingos Monteiro
http://thebuildingcoder.typepad.com/blog/2014/04/whats-new-in-the-revit-2015-api.html#3.13
... looking forward to a sample to share!
Cheers,
Jeremy
The developer we have working on this project had a look into these 2015 API changes, and had this to say:
"It appears that the requirements would want to know more about the organization settings, namely the Filtering and Grouping settings, which I don't see exposed in BrowserOrganization class. It appears to me that this class has been created to help add-ons re-create the browser in their own interface without knowing the user settings behind the current organization -- am I right?"
Our goal/requirements are to present the pieces of information we are gathering from the Revit project and presenting them to the user (in our own dialog) but in the same way that they appear in the Project Browser (except they would be a small subset of all the things the Project Browser displays).
This primarily includes Filtering and Grouping, and while I confess I haven't delved into this personally, the developer working on the project unfortunately finds that it appears we cannot get the current Project Browser filtering and grouping settings through the Revit API. It looks like this new piece of the API makes good information available, but not also *how* it currently being presented to the user by the Revit GUI, which is what we're also after.
.
Dear CoderBoy,
Thank you for evaluating the new BrowserOrganization API and explaining your needs that apparently extend beyond what it curently provides.
I submitted the wish list item CF-1269 [API: retrieve the how and why of browser organisation] on your behalf for the functionality you suggest, as this issue requires exploration and possibly a modification to our software. Please make a note of this number for future reference.
I hope this helps.
Best regards,
Jeremy
Hi,
If that helps ....
There is"AreFiltersSatisfied" method on BrowserOrganization class. Parameter is Id of View and you will know if the view is visible on ProjectBrowser... I don't found the way to get another details on current filter actually applying ( Name, parameter .. )
When you've got a visible view, there is "GetFolderItems" method on BrowserOrganization. Method return a list of parameters ..
I don't know if it's the best practice but it's seems to work...Tell me if you found another informations on this subject
Best regards,
@Anonymous wrote:Dear CoderBoy,
I submitted the wish list item CF-1269 [API: retrieve the how and why of browser organisation] on your behalf for the functionality you suggest, as this issue requires exploration and possibly a modification to our software. Please make a note of this number for future reference.
Jeremy
Hi - Is there any update on "CF-1269 [API: retrieve the how and why of browser organisation]"? Just to make sure we are talking about the same thing, the attached screenshots show the data that I would like to read via the API.
As a seperate request, I would also like be able to set all these properties.
Dear Harry, Cedric and CoderBoy,
I am very sorry to report that apparently nothing whatsoever has ever happened to the wish list item CF-1269 [API: retrieve the how and why of browser organisation].
I do not know whether it was ever even noticed by the development team.
Sorry about that!
I raised the priority to critical now and added your updates to it.
I changed the description, too, to CF-1269 [API: read and write the how and why of browser organisation].
I hope this helps.
Best regards,
Jeremy
Dear Harry, Cedric and CoderBoy,
The development team now took notice of the issue CF-1269 [API: read and write the how and why of browser organisation], so things might start moving...
I hope this helps.
Best regards,
Jeremy
Dear Harry, Cedric and CoderBoy,
Here is a new thread with an update on the issue CF-1269 [API: read and write the how and why of browser organisation]:
I am sorry to say nothing relevant has happened yet.
Please let us continue this discussion in the new thread.
Thank you!
Best regards,
Jeremy
Did any of this come available in the 2020 revit api? As I am still not finding the proper properties to get all the sort properties and their values..
Edit: It will require some work but it is possible from there:
https://forums.autodesk.com/t5/revit-api-forum/browser-organization-grouping/td-p/7218999
Significant enhancements were made in the Revit 2019 API:
https://thebuildingcoder.typepad.com/blog/2018/08/whats-new-in-the-revit-20191-api.html#3.2.22
Glad to hear you already found a solution and thank you for pointing to the other thread.
Please share your final solution here as well in case anybody else comers looking...
Thank you!
Best regards,
Jeremy
Can't find what you're looking for? Ask the community or share your knowledge.