Hi there,
my short question is:
Is there a way to create the "Default" system family for PipeInsulationType via the Revit API?
Sometimes this family is not present in the customers drawing and gets instanciated first when you click "Add Insulation" in the modify tab of the selected pipe. This is very tricky to do with the Revit API.
Our current workaround is to deliver our own Revit template file, which always contains the "Default" PipeInsulationType. We open this template in the background and copy the desired system family with ElementTransformUtils.CopyElements to the real project. This is a little slow and prone to errors, I guess. So my question is really:
Is there a better approach to generate a system family without copying from some other document file? Maybe directly with the Revit API?
Thanks, a lot!
Ciao, says
Christian
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
Dear Christian,
One small step forward might be to use the copy and paste API to copy your required element from your custom template file into the current project lacking it:
Retrieving the pipe insulation type may be convoluted, or at least apparently was so in the past:
http://thebuildingcoder.typepad.com/blog/2012/05/pipe-insulation-and-insulation-material.html
Cheers,
Jeremy
Dear Jeremy,
thank you very much for your quick answer and the usefull links. Actually in our code we already use the "copy and paste API" with it's method:
ElementTransformUtils.CopyElements(Document, ICollection<ElementId>, Document, Transform)
with good results. I did not know it had a proper API name. I just did wonder, if there would be some other approach. For example in a bad case scenario: If some customer decides to alter or replace our delivered template file ... he or she might be in trouble ... if the "Default" PipeInsulationType is somehow missing. On the other hand: the template file is write-protected, hidden and if it is damaged a fresh install will always help. Ok, I think I am fine.
Nevertheless, is it possible to create an API wishlist item like "Document.CreateDefaultSystemFamilyFor(BuiltInCategory)"? This would be awesome! Thanks for your help!
Ciao, says
Christian
Dear Christian,
All Revit API wishes should be added to the Revit Idea Station and tagged as API:
http://forums.autodesk.com/t5/revit-ideas/idb-p/302/
That was mentioned a lot at AU and in other recent events:
http://thebuildingcoder.typepad.com/blog/2016/11/au-day-two-ifc-and-revit-api-panel.html#6
http://thebuildingcoder.typepad.com/blog/2016/11/au-day-one-keynote-and-devlab.html#6
Would you like to do that?
I also added it to the development database as wish list item CF-4720 [API: Default PipeInsulationType or CreateDefaultSystemFamily for BuiltIn Category in general].
You can refer to that in your Idea Station entry.
And try to get lots of votes for it.
Thank you!
Cheers,
Jeremy
Dear Jeremy,
thanks for your support! Of cause, I will try the suggested way with the "Revit Idea Station". I am going to mark your first answer as solution for this issue. Thanks a lot! You are incredible!
Best regards,
Christian
it is 2022 and this is still not fixed.
I added a new note of this to the development ticket to make the development team aware of your wish and raise its priority.