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: 

Default system family creation for PipeInsulationType

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
christian.tonn
821 Views, 6 Replies

Default system family creation for PipeInsulationType

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

6 REPLIES 6
Message 2 of 7

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:

 

http://thebuildingcoder.typepad.com/blog/2013/05/copy-and-paste-api-applications-and-modeless-assert...

 

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 7

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

Message 4 of 7

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 7

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

Message 6 of 7

it is 2022 and this is still not fixed.

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug
Message 7 of 7

I added a new note of this to the development ticket to make the development team aware of your wish and raise its priority.

  

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

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