Copy sheets along with views and schedules using revit Apis

Copy sheets along with views and schedules using revit Apis

bhargavsKZ39V
Explorer Explorer
493 Views
3 Replies
Message 1 of 4

Copy sheets along with views and schedules using revit Apis

bhargavsKZ39V
Explorer
Explorer

Hi Everyone , By using copy method,

 ElementTransformUtils.CopyElements(linkedDoc, Sheet_ids, doc, Transform.Identity, new CopyPasteOptions());

 

i can copy sheets from source file to destination file but i couldnt copy views and schedules placed on that  sheets , please suggest some solution for coping sheets along  with views and schedules paced on that sheets , Thanks in advance 

0 Likes
494 Views
3 Replies
Replies (3)
Message 2 of 4

jeremy_tammik
Alumni
Alumni

Have you looked at the DuplicateViews Revit SDK sample?

  

DuplicateViews

   

Subject: Copy paste drafting views and schedules from one document to another
Skill Level: Medium
Category: Elements, Views
Type: ExternalApplication,
Revit Platform: All
First Released For: 2014.0
Classes: Autodesk.Revit.DB.CopyPasteOptions
Autodesk.Revit.DB.ElementTransformUtils
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.IDuplicateTypeNamesHandler
Autodesk.Revit.DB.IFailuresPreprocessor
Autodesk.Revit.UI.IExternalCommand
Summary:

Use the copy paste APIs to copy drafting views and schedules from one document to another. The drafting view contents will also be copied.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 4

bhargavsKZ39V
Explorer
Explorer
Hi Jeremy, thanks for reply ,through above code i can copy views and schedules, but exactly what I want is copy view sheets from one document to other, when i do that , I can copy only empty sheets (blank sheets) , I want views placed on sheets also copied along with that sheets
0 Likes
Message 4 of 4

bhargavsKZ39V
Explorer
Explorer

2023-10-09_12-36-23.png

Any revit apis avaialable for above insert views from file, because thats how maually we can copy sheets from other documents? thanks in advance 

 

0 Likes