Setting visibility of category classes

Setting visibility of category classes

Anonymous
Not applicable
1,426 Views
4 Replies
Message 1 of 5

Setting visibility of category classes

Anonymous
Not applicable

Hi,

 

There are a few new properties in the API that let you see if certain category classes are hidden or not.

one example is 

myView.AreAnalyticalModelCategoriesHidden

 

unfotunately you can't set this property. Is there any way to manually do this? I could set the visibility of each category manually but I dont know how to identify if a category is an analytical model one or not? 

 

Thanks,

 

Rod

0 Likes
1,427 Views
4 Replies
Replies (4)
Message 2 of 5

gopinath.taget
Alumni
Alumni

Hello,

 

There are two methods that might interest you:

 

View.HideCategoryTemporary

View.HideCategoriesTemporary

 

These methods will hide element categories.

 

Also this blog post shows how to determine the category of a family:

 

http://adndevblog.typepad.com/aec/2012/08/deleting-a-collection-of-elementsfamilies-the-correct-appr...

 

Hope this helps.

 

Best Regards

Gopinath

 

Thanks

Gopinath

0 Likes
Message 3 of 5

Anonymous
Not applicable
I dont think this addresses my problem?

I want to hide all Analytical Model Categories like the tickbox in the visibility/graphics menu does. I know I can hide each category individually, but how do I tell if a category is an analytical model category?

It would be great if AreAnalyticalModelCategoriesHidden could be set and not just read from but maybe thats coming in a future version of the API.
0 Likes
Message 4 of 5

Anonymous
Not applicable

I encountered this problem some time ago. What I did was taking a look at the visibility graphics dialog in revit and made an internal xml of all categories that belonged to the analytical tab. After that I could loop through my selected families and check if their category was in my list, hence being an analytical model category. It may be a dirty way, but it worked for me.

0 Likes
Message 5 of 5

andrzej.trelinski
Autodesk
Autodesk

Hi Rod and Remy,

 

Since 2015 property AreAnalyticalModelCategoriesHidden in class View is read and write.

You can hide analytical model categories by following code:

View view = …;

view. AreAnalyticalModelCategoriesHidden = true;

 

Regards,

Andrzej Trelinski

Revit Structure Developer

0 Likes