How to read Browser Organization info from the Revit API? (2013 - 2015)

CoderBoy
Advocate
Advocate

How to read Browser Organization info from the Revit API? (2013 - 2015)

CoderBoy
Advocate
Advocate

 

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.

 

0 Likes
Reply
4,220 Views
17 Replies
Replies (17)

akira.kudo
Alumni
Alumni

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





Akira Kudo

Developer Technical Services

Autodesk Developer Network


0 Likes

CoderBoy
Advocate
Advocate

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.

 

 

 

0 Likes

arnostlobel
Alumni
Alumni

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

Arnošt Löbel
0 Likes

Anonymous
Not applicable

 

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

0 Likes

jeremytammik
Autodesk
Autodesk

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes

CoderBoy
Advocate
Advocate

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.

 

.

0 Likes

jeremytammik
Autodesk
Autodesk

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes

CoderBoy
Advocate
Advocate

Thank you very much Jeremy!  

 

🙂

 

 

0 Likes

Anonymous
Not applicable

Hi,

 

Have you got any solution for this problem?

0 Likes

CoderBoy
Advocate
Advocate

Hi Cedric.

 

No, unfortunately there appears to be no solution available in the Revit API for this need.

 

Regards.

 

 

0 Likes

Anonymous
Not applicable

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,

0 Likes

boostyourbim
Advocate
Advocate

@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.

0 Likes

jeremytammik
Autodesk
Autodesk

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes

jeremytammik
Autodesk
Autodesk

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes

jeremytammik
Autodesk
Autodesk

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]:

 

http://forums.autodesk.com/t5/revit-api/setting-the-browserorganization-for-a-project-in-revit-2016/...

 

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes

WorldDue
Enthusiast
Enthusiast

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

0 Likes

jeremy_tammik
Autodesk
Autodesk

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

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes