0

I'm trying to copy some ViewSheet elements from one document to another, but I always get a: "Copying one or more elements failed."

It's working fine with ViewDrafting and ViewSchedule - checked the DuplicateViews sample on the SDK already, and this code is entirely based on that.

Here is the line of the failure:

ICollection<ElementId> copiedIds = 
    ElementTransformUtils.CopyElements(fromDocument, elementIds, toDocument, Transform.Identity, options);

I wonder if there is a way to mitigate these CopyElements errors to see if I'm missing something.

Izzy Rodriguez
  • 2,097
  • 3
  • 21
  • 32
  • Does it fail with all the ViewSheet elements you try copying, or only certain ones? Also, note this restriction in the API docs for CopyElements: "This method can be used for copying non-view specific elements only. For copying view-specific elements, use the view-specific form of the CopyElements method. The destination document can be the same as the source document." If the CopyElements method also tries to copy elements that are on the sheet, this could trigger the exception. – Colin Stark Jul 10 '14 at 21:47
  • Already tried the one-by-one method, and failed with all of them. I'll checked the code to see if they copy the inner elements also. – Izzy Rodriguez Jul 11 '14 at 15:14
  • Already talked with the ADN guys and they indeed confirmed something is wrong. Just waiting for a response now. – Izzy Rodriguez Jul 17 '14 at 14:53

0 Answers0