Autodesk Model Checker to detect group type having minor instances

Autodesk Model Checker to detect group type having minor instances

tranduytanktsCWAZB
Explorer Explorer
501 Views
4 Replies
Message 1 of 5

Autodesk Model Checker to detect group type having minor instances

tranduytanktsCWAZB
Explorer
Explorer

Hello everyone,

 

I am trying to make a check that can detect model group type that has only one instance placed in the model. I have tried to look for API but I could not retrieve Autodesk.Revit.DB.GroupSet class to get the properties "Size" of it. Does anyone have an idea about that?

 

Thank you in advance for your help

tranduytanktsCWAZB_0-1724309054151.png

 

0 Likes
502 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

I was not even aware of the model checker API until reading your question, searching, and discovering the support article on The Model Checker API:

  

  

I tried to download the attached PDF to that article, but with no success:

    

  

Did you have better luck? Is that what you are working with?

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 5

jeremy_tammik
Alumni
Alumni

I had better luck with other search hits:

  

  

That lead to this link that works for me:

  

  

Is that what you are working with?

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 4 of 5

tranduytanktsCWAZB
Explorer
Explorer

Hi,

Thank you for your reply. Actually I was not referring to the Checking Tool API itself. I was looking at the RevitAPIDocs and utilise it to create a check. It's very similar with the check like this below. Instead, I was trying to retrieve Group Set Class and get it Size properties.

tranduytanktsCWAZB_1-1724318104905.png

 

Basically, some members in my project often create model group with only one instance placed. I think they get used to with working in CAD so they group everything as a way to organize the file. I want to avoid that so I created the checkset.

tranduytanktsCWAZB_0-1724315984330.png

 

0 Likes
Message 5 of 5

jeremy_tammik
Alumni
Alumni

Oh how confusing. So, your title mentions the Model Checker, and you are not using it at all? Yes, indeed, that needs clarification. GroupSet.Size returns the number of groups in a set:

  

  

The GroupSet class is not derived from Element, so you will never find a group set in a BIM. It is a memory-only class. Maybe it is obsolete as well. So, it probably has nothing whatsoever to do with the task you are trying to address.

  

I suggest that you take a closer look at your BIM and the groups that you wish to analyse using RevitLookup and other database exploration tools to discover what exactly you need to do and how it can be achieved.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open