How to get access to data from "Visiblity/Graphics"?

How to get access to data from "Visiblity/Graphics"?

Act-3D
Contributor Contributor
3,470 Views
3 Replies
Message 1 of 4

How to get access to data from "Visiblity/Graphics"?

Act-3D
Contributor
Contributor

I want to check if "Visiblity/Graphics" settings changed for a given View.

How to get access to data from "Visiblity/Graphics"?

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

jeremytammik
Autodesk
Autodesk

Dear Artur,

 

Thank you for your query.

 

Have you tried searching the Internet for this information?

 

I get quite a lot of hits searching for "revit api visibility graphics":

 

https://duckduckgo.com/?q=revit+api+visibility+graphics

 

You probably should be more precise about what exact settings you wish to access, though.

 

Here is one specific example from The Building Coder:

 

http://thebuildingcoder.typepad.com/blog/2014/08/upcoming-event-calendar.html#5

 

There are many more, though.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

0 Likes
Message 3 of 4

Act-3D
Contributor
Contributor

Hi Jeremy,

 

Thank you for your reply.

What I'm exactly looking for is list of model categories hidden in a given view.

 

I'm aware of:

GetCategoryHidden(ElementId categoryId);

 

But maybe there is a better way than iterating through all categories and check if it is hidden?

0 Likes
Message 4 of 4

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Artur,

 

Thank you for your update.

 

I am not aware of a better method.

 

Check the View class methods:

 

http://www.revitapidocs.com/2017/d8d64cdb-46b7-6486-7cb5-07178b65a87b.htm

 

There is also a Visible property on the Category class:

 

http://www.revitapidocs.com/2017/863e37ff-4415-5d39-d371-36c3284812d7.htm

 

You might want to take a look at this related discussion as well:

 

https://forums.autodesk.com/t5/revit-api-forum/user-hidden-categories/td-p/6377567

 

I hope this helps.

 

Best regards,

 

Jeremy



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