BrowserOrganization.SortingParameterId

BrowserOrganization.SortingParameterId

Anonymous
Not applicable
1,124 Views
3 Replies
Message 1 of 4

BrowserOrganization.SortingParameterId

Anonymous
Not applicable

This method returns and ElementId, but the integer value is negative and Document.GetElement refuses to touch it.

 

According to the description BrowserOrganization.SortingParameterId returns the Id of the parameter used to determine the sorting order of items in the browser.

 

it seems weird to expose a property that has no function in the API, so I wonder if there is any companion API or utility class that allows us to actually do something with the ElementId?

All I really need to do is to sort the BrowserOrganization FolderItemInfo and View in the same way as is done by the Revit project browser, which I presume this parameter Id is supposed to facilitate.

 

 

 

0 Likes
Accepted solutions (1)
1,125 Views
3 Replies
Replies (3)
Message 2 of 4

jeremytammik
Autodesk
Autodesk
Accepted solution

Afaik, built-in parameter enumeration values are negative constants and are sometimes (mis-) used as pseudo element ids.

 

Have you checked whether the negative integer value corresponds with a built-in parameter enum?

 

Possibly related discussions:

 

http://thebuildingcoder.typepad.com/blog/2010/04/elementid-parameter-value.html

 

http://thebuildingcoder.typepad.com/blog/2014/04/element-id-export-unique-navisworks-and-other-ids.h...

 

http://thebuildingcoder.typepad.com/blog/2013/12/au-day-2-worksharing-and-revit-2014-api-roundtables...

 

"element ids are used to represent elements, parameters and categories. for params, the id may be negative, e.g. bip, or non-negative, custom or shared. when you call get element on that id, it returns the parameter definition."



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

Message 3 of 4

Anonymous
Not applicable

This answers the question (I got the 'elementid' -1005166, which corresponds with BuiltInParameter.PLAN_VIEW_LEVEL)

 

Unfortunately this is only a part of the answer I need for my problem, but it appears that the missing parts have (still) not been added to the API

 

I am trying to organise and sort a list of Views in the same way that the project browser does. The BrowserOrganization.SortingParameterId only allows to find the sort option, not the Grouping settings (and neither are the filtering settings).

 

0 Likes
Message 4 of 4

sduarte_QD
Enthusiast
Enthusiast

Any developments on this? I know for a fact that organizing views (at least schedules) like the project browser definitions (even if you have more than one you can get that definition and toggle) is possible... Just can't seem to find exactly how... Yet... Any help would be greatly apreciated!

I bet it has to do with this:

BrowserOrganization browserOrganization = BrowserOrganization.GetCurrentBrowserOrganizationForSchedules(doc);

like in one of @jeremytammik blog posts, but I'm at a lost as o how to use it.

0 Likes