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
Solved! Go to Solution.
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
can now be set. This allows the category of an family being edited to be changed.
*--------
Hope this helps.
Best Regards,
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
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
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.