Copy from one View to Another Views : CopyElements(View, ICollection, View, Transform, CopyPasteOptions)

Hello Forum Members,
I am trying to copy an image instance (1 or more elements) for Specific Views. Similar to Copy in Clipboard and Paste to Selected Views.
But here comes the irritating part, Whenever I am trying to input Views to above Method it gives an error saying expected Document got ViewSheet.
Basically I want to work on CopyElements(View, ICollection, View, Transform, CopyPasteOptions) but it takes CopyElements(Document, ICollection, Document, Transform, CopyPasteOptions) this is my understanding.
Can someone please enlighten me ?

Here is the API reference.

I think the issue is that you can’t pass a ViewSheet (Drawing Sheets) from the Get All View node, you need to pass it an actual view like Floor Plan or Detail.

1 Like

Hi SeanP,
Yes I checked it, we cannot pass ViewSheet.
But is there any other option for copy paste on ViewSheets ?
Because we can do it on Revit itself by Copy & Paste to Selected Views - But I need to achieve this in API.

Are you able to do what you want in the regular Revit UI? Typically copying things between views and sheets does not work. If you are unable to do what you want in the UI, you will most likely not be able to do it in the API either.

1 Like