Anuncios
Welcome to the Revit Ideas Board! Before posting, please read the helpful tips here. Thank you for your Ideas!

Expose "Insert Views from File" in Revit API

Currently there is no option to use the "Insert Views from File" functionality directly with the Revit API.  It would be great if that was exposed as a Revit API method to get around the hurdles and limitations of using the ElementTransformUtils class.

 

ElementTransformUtils.CopyElements(...) is limited in what it can copy from Document to Document, and doesn't have the full functionality for a full copy of drafting views or sheets if there are elements placed on those views that are considered as "View-specific", such as callouts or section lines.

 

For example, you can have a drafting views that contain Section references to another drafting view, but they are just references and not actual section cuts in a model. If you attempt to use ElementTransformUtils.CopyElements(...) on those drafting views, the Revit API will fail because it considers those section references as elements not able to be copied. That said, that same drafting view is able to copy over from Document to Document just fine using the "Insert Views from File" command.

 

Please expose "Insert Views from File" in the Revit API!

Comentarios
Contributor
Contributor

I just ran into this exact same issue.

 

I tried to collect all the views referenced in the main drafting views and add them to the List of ElementIds that is passed as argument #2 to CopyElements, but it still does not work.

 

We need this command exposed or CopyElements needs an overload to also copy referenced views.