browser organization grouping

browser organization grouping

a.noya
Participant Participant
3,001 Views
4 Replies
Message 1 of 5

browser organization grouping

a.noya
Participant
Participant

Hello fellow C#ers,

 

I'm trying to create a viewlist and grouping them in the way of the active browserorganization.

 

In our template at the office we have multiple parameters called: prject_browser_level1, prject_browser_level2 etc.

The paramters are used in the browser organization under the tab "grouping and sorting" (see attachment).

Unfortunelately, i can't find them when going through all paramters within here:

 

BrowserOrganization.GetCurrentBrowserOrganizationForViews(commanddata.Application.ActiveUIDocument.Document).Parameters

 

Another way to do it is maybe within the information of a specific view.

Now i use the following code, and it's working for projects that use the browser organization called "all".

view.GetTypeId()) as ElementType

If there would be something like view.GetBrowserOrganizationGroup() i would be able to do it.

 

Does anyone has experience with this?

 

 

 

 

Accepted solutions (1)
3,002 Views
4 Replies
Replies (4)
Message 2 of 5

FAIR59
Advisor
Advisor
Accepted solution

You can check if a View is visible in the ProjectBrowser:

 

BrowserOrganization org = BrowserOrganization.GetCurrentBrowserOrganizationForViews(doc);
bool viewIsVisible = org.AreFiltersSatisfied(myView.Id);

the "groupHeaders" for the view are :

 

List<FolderItemInfo> folderfields = org.GetFolderItems(myView.Id).ToList();
foreach( FolderItemInfo info in folderfields)
	{
	// "groupheader" in browser == parameter value for grouping parameter
	string groupheader = info.Name;
	// parameterId for the grouping parameter
	// parameterId <0  parameter is BuiltInParameter
	ElementId parameterId = info.ElementId;
	}

 

Message 3 of 5

a.noya
Participant
Participant

Thank you very much,

That was exactly what is was looking for.

It works perfectly!

0 Likes
Message 4 of 5

Rockit_for_Revit
Advocate
Advocate

I'm trying to do the same but I would like to get the very next or previous view in the project browser order. Any ideas?

 

Message 5 of 5

mj.deboer
Explorer
Explorer

is it also posible to modify/create the browserorganization?