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: 

Generic model family defining category

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
GeomGym
1483 Views, 4 Replies

Generic model family defining category

From the API, can I set the family category having started from a generic model template?

 

I recall being told it might be possible in 2014 (maybe I've overlooked and it's possible in earlier versions).

 

At the moment I ship various templates with categories preset.

 

Thanks in advance,

 

Jon

4 REPLIES 4
Message 2 of 5
gopinath.taget
in reply to: GeomGym

Hi,

 

I enquired with my colleagues in engineering and they mentioned that this is possible in Revit 2014:

 

*--------

This was enabled in 2014 (from what’s new):

 

Family category

The property

  • FamilyBase.FamilyCategory

 

can now be set.  This allows the category of an family being edited to be changed.

*--------

 

Hope this helps. 

 

Best Regards,

Gopinath Taget

Message 3 of 5
GeomGym
in reply to: gopinath.taget

Hi Gopinath,

 

Thanks for the reply.  I can see this property can now be set, but what I can't see is how to construct a category object to assign.

 

Can you please advise (sorry for the delay in responding, I didn't use to many new categories since posting but looks like I will soon).

 

Thanks,

 

Jon

Message 4 of 5
Anonymous
in reply to: GeomGym

Hello,

 

Have you looked at this blog post already: http://thebuildingcoder.typepad.com/blog/2012/04/adding-a-category-to-a-shared-parameter-binding.htm...

 

It talks about creating a new category and adding it to a new category set.

 

Cheers

Gopinath

Message 5 of 5
GeomGym
in reply to: Anonymous

Thanks, I hadn't seen that post.

 

I just tested and something like this seems to do what I need.

 

famDoc.OwnerFamily.FamilyCategory = famDoc.Settings.Categories.get_Item(BuiltInCategory.OST_PlumbingFixtures);

 

This is great news.  Appreciate your help.

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

Post to forums  

Autodesk Customer Advisory Groups


Rail Community