# ElementTransformUtils.CopyElements issue revit 2025

**URL:** <https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176>\
**Category:** Uncategorized\
**Tags:** dynamo\
**Created:** [July 31, 2024, 7:46pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176 "2024-07-31T19:46:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![DangeRuss](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@DangeRuss](https://forum.dynamobim.com/u/DangeRuss)\
**Post date:** [July 31, 2024, 7:46pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/1 "2024-07-31T19:46:34Z")

</div>

i have graph that uses the rhythm copy elements from view to view node it has an exception error that crashes r2025

i pulled this node out to the main graph and found the error with this python node. unfortunately, i don’t have the python know how to determine the issue.

The error happens at line 26. Any ideas how I can correct this code? Below is the python code from the node.

“line 26 ~~~~ newId = ElementTransformUtils.CopyElements(sourceView, ele, destView, None, CopyPasteOptions() )”

error message before crash

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/3/c3d170c710d8eeeceecc4af71863baca96b927e0.png)

````newId

> ```
> #Based on a node originally from Dimitar Venkov
> import clr
> 
> clr.AddReference("RevitServices")
> import RevitServices
> from RevitServices.Persistence import DocumentManager
> from RevitServices.Transactions import TransactionManager
> doc = DocumentManager.Instance.CurrentDBDocument
> doc1 = DocumentManager.Instance.CurrentDBDocument
> 
> clr.AddReference("RevitNodes")
> import Revit
> clr.ImportExtensions(Revit.Elements)
> clr.ImportExtensions(Revit.GeometryConversion)
> 
> clr.AddReference("RevitAPI")
> from Autodesk.Revit.DB import *
> 
> from System.Collections.Generic import*
> 
> 
> ele = List[ElementId](IN[0])
> sourceView = UnwrapElement(IN[1])
> destView = UnwrapElement(IN[2])
> 
> newId = ElementTransformUtils.CopyElements(sourceView, ele, destView, None, CopyPasteOptions() )
> 
> res1 = [doc.GetElement(newId[i]).ToDSType(False) for i in range(len(newId) )]
> 
> OUT = res1
> ```
````

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [July 31, 2024, 8:53pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/2 "2024-07-31T20:53:09Z")

</div>

Try installing the latest version of Rhythm, as I don’t recall there being a .DYF for this in the package. Can you provide a screenshot of the graph so we can understand the structure?

---

<div class="post-metadata">

**Author:** ![DangeRuss](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@DangeRuss](https://forum.dynamobim.com/u/DangeRuss)\
**Post date:** [August 14, 2024, 8:51pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/4 "2024-08-14T20:51:52Z")

</div>

Sorry I got busy and took a bit of a break, but back too it and still lost.

After digging around a bit, It looks like this is a custom node based off a rhythm node. Unfortunately, the colleague that develop this is no longer with us. This is a massive graph, but the gist is: it gets a list of typical details and compares against a user modified spread sheet. sorts the list to retrieve specific details.  
ele = is all the elements from the typical details \> flattens the list \> gets the element IDs  
sourceView = List of drafting view names to be copied  
destView = coppied elements from list of drafting view names to be copied

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/9/c904130a15e9b07207bdb42e13b8ca82bfd61854.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [August 14, 2024, 9:23pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/5 "2024-08-14T21:23:48Z")

</div>

Why not replace it with the new version?

---

<div class="post-metadata">

**Author:** ![DangeRuss](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@DangeRuss](https://forum.dynamobim.com/u/DangeRuss)\
**Post date:** [August 15, 2024, 7:48pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/6 "2024-08-15T19:48:55Z")

</div>

I couldn’t find any matching nodes in the Rythm package, suggesting it must be a custom node. It’s also saved in a Company package. This led me to point Dynamo to a test folder on my local system, where I have the latest versions of all packages. There was an issue with the IronPython 2.7 v2.1.0 package: it runs now but with a different error, but doesn’t crash, unlike the old package location.

new error is :  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/1/c11c6b57324534792a08e2f25f67444e4a5ff9ac.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [August 15, 2024, 8:10pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/7 "2024-08-15T20:10:06Z")

</div>

For Revit 2025 you need the newer version of DynamoIronPython2 - version 3.2.1 if memory serves.

You cannot use the same version across multiple builds.

---

<div class="post-metadata">

**Author:** ![DangeRuss](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@DangeRuss](https://forum.dynamobim.com/u/DangeRuss)\
**Post date:** [September 4, 2024, 8:46pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/8 "2024-09-04T20:46:53Z")

</div>

doesn’t matter what I do I’m still getting that same error. Can anyone point me in the right direction?

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/8/186539f6f6c98cf8af45c44b6b9627febe501379.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 4, 2024, 10:37pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/9 "2024-09-04T22:37:34Z")

</div>

You’re not loading any winforms in that code so we don’t have a full picture. Post your graph and any custom nodes, configured to run on a sample model (indicating which one) so people can try to reproduce.

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [September 5, 2024, 5:43am UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/10 "2024-09-05T05:43:58Z")

</div>

Hi,

The ContextMenu class is not available in .NET Core. Use [ContextMenuStrip](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.contextmenustrip?view=netframework-4.8.1) instead

---

<div class="post-metadata">

**Author:** ![DangeRuss](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@DangeRuss](https://forum.dynamobim.com/u/DangeRuss)\
**Post date:** [March 18, 2025, 3:58pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/11 "2025-03-18T15:58:27Z")

</div>

this all stemmed from a bug between dynamo and an add-in. updated the add-in and problem resolved

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [March 19, 2025, 12:16pm UTC](https://forum.dynamobim.com/t/elementtransformutils-copyelements-issue-revit-2025/103176/12 "2025-03-19T12:16:46Z")

</div>

Renamed this thread as it is not a Rhythm issue, but a python issue from old code taken from a previous version of Rhythm.
