Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

browser organization grouping

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
a.noya
2564 Views, 4 Replies

browser organization grouping

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?

 

 

 

 

4 REPLIES 4
Message 2 of 5
FAIR59
in reply to: a.noya

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
in reply to: FAIR59

Thank you very much,

That was exactly what is was looking for.

It works perfectly!

Message 4 of 5
Rockit_for_Revit
in reply to: a.noya

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
in reply to: FAIR59

is it also posible to modify/create the browserorganization?

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report