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: 

Merge SubCategories of Family or Project Files using C#

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
atiefenbach
1206 Views, 5 Replies

Merge SubCategories of Family or Project Files using C#

As we get closer to releasing Revit 2015 to the masses I'd like to clean up our families and project files to be free of Non-Standard Subcategories.  For example, I loaded every one of our families into a OOTB Imperial template and then exported the list of categories and subcategoriesfrom that project. There are all kinds of discrepencanies, like, "Hidden", "hidden", "Hidden Line", and the OOTB "Hidden Lines" subcategories.

 

Is it possible to merge those subcategories into the "Hidden Lines" subcategory within the project?  Then I'll rexport them back to families files.

 

I thought about trying to merge the subcategories within each family, but the problem is, the family can show no subcategories, but could still create subcategories when loaded if there is a sub-family that had that subcategory.  By changing it in the project, then exporting, it permantely deletes those invisible subcategories.  This is my prefered method because it would allow me to keep the families in the same folder structure.  Is this method possible?

 

Thanks!

Anthony Tiefenbach
BIM Manager
HuntonBrady Architects
5 REPLIES 5
Message 2 of 6
R.van.den.Bor
in reply to: atiefenbach

As far as I know you can't merge subcategories, but what you can do is to change the element subcategory to the Hidden Line subcategory, and then delete the "old" subcategories.
Kind regards,
Remy van den Bor
ICN Solutions B.V.
Liked this post or found it usefull, don't forget the Kudo It won't hurt (at least not me).
Message 3 of 6
Joe.Ye
in reply to: atiefenbach


Not quite clear of your process. How do you merge those subcategories in a project? Just by changing the subcategory's name? or changing the existing element's subcategory. and delete those unused subcategories.


Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Message 4 of 6

Hello,

 

Are you able to do this using the UI? If you are not able to do it using the UI, then it will not be possible with the API.

 

Best Regards

Gopinath

Message 5 of 6
atiefenbach
in reply to: R.van.den.Bor

I was hoping that wasn't the solution, but it looks like I'll need a routine that will open each one, and it's nested families, and change their subcategories to our standards.  It's just a bit more complicated because of things like Filled Regions, where I'll have to edit their subcategory by sketch.

 

Thanks for the replies!

Anthony Tiefenbach
BIM Manager
HuntonBrady Architects
Message 6 of 6
atiefenbach
in reply to: atiefenbach

Just a quick note to anyone else looking for this information:

As I've started investigating this further i've realized that families, when opened can show the correct sub-categories, but when loaded into a project, it adds additional sub-categories. For instance, I have a Title Block family that when loaded, it adds sub-categories to the Windows category, even though that family doesn't even have a Windows category.

I guess that makes sense, because a family is still a Document, which means it's storing all kinds of object style information that I might need to purge out, as well. I'll need to double-check all my family templates as well for these inconsistencies.
Anthony Tiefenbach
BIM Manager
HuntonBrady Architects

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community