Revit API

Reply
Distinguished Contributor
bthatcher
Posts: 749
Registered: ‎12-12-2003
Message 1 of 5 (346 Views)

2013 Category Visibility

346 Views, 4 Replies
09-06-2012 05:45 AM

There has been a change in the way category visibility works in between 2012 and 2013. I believe it has to do with the discipline filter list from the Visibility/Graphic dialog. How do I test for, exclude or override categories hidden by the user in this way? The VisibilityControl sample from the SDK samples illustrates the error. Thanks. 

Employee
saikat
Posts: 185
Registered: ‎08-16-2007
Message 2 of 5 (330 Views)

Re: 2013 Category Visibility

09-10-2012 03:39 PM in reply to: bthatcher

Hi

 

Can you please provide the steps that I can use to reproduce the error with the SDK sample. I tested it and I found an unexpected behavior with the PickObject() but the rest of the sample seemed to work fine.

 

thanks

Saikat



Saikat Bhattacharya

Distinguished Contributor
bthatcher
Posts: 749
Registered: ‎12-12-2003
Message 3 of 5 (320 Views)

Re: 2013 Category Visibility

09-11-2012 08:04 AM in reply to: saikat

I simply build it, load and run it from the Add-In Manager. When I select a category in the chekedListBox, I get the attach error. Click OK, and the category (levels in this case) remain visible. The second image is from the Add-In I wrote. I get the error in a Drafting View that is named 'Save With This View'. It is displaying the view name as a category. I can't find anything about that view Revit Lookup/Snoop DB... That would indicate why it would be considered 'user hidden'. The errors aren't necessarily the same, but I thought I would be able to solve mine from an answer to the SDK sample. They both worked fine in 2012. I'm assuming it has something to do with the Discipline filter in the V/G dialog. Thanks. 

Employee
saikat
Posts: 185
Registered: ‎08-16-2007
Message 4 of 5 (286 Views)

Re: 2013 Category Visibility

09-18-2012 10:38 AM in reply to: bthatcher

Hi

 

Sorry for the delay in responding back to this query. The SDK sample works perfectly well at my end with Revit 2013 and with the Basic Sample Project that is included in Revit installation. Is the error you are receiving specific to a Revit file? If yes, can you please inlcude that to this post so that I can investigate this further. Please make sure the revit file does not contain any confidential information.

 

Else, I could take a look at your Sample VS project if you can create a minimal buildable version of it and include it here.

 

I did some search but so far could not get any specific reports of similar dialogs in Revit 2013.

 

thanks

Saikat 

 

 



Saikat Bhattacharya

Contributor
zhangle
Posts: 19
Registered: ‎07-05-2009
Message 5 of 5 (105 Views)

Re: 2013 Category Visibility

09-11-2013 04:46 PM in reply to: bthatcher

I realize this thread is kind of old, but I have encountered the same problem and spend hours on it. It is worsened by the unclear exception message. So I guess it would be helpful to add a solution here just in case someone else will see this when they google.

 

Basically, not all categories' visibility can be accessed via someCategroy.get_Visible(someView). It needs to be checked first via someCategory.get_AllowsVisibilityControl(someView) is true.

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.