Move reference plane

Hello everyone,
I would like to ask if there is any way how to move revit reference planes?
There is way how to get dynamo plane from Revit plane, shift it and then create the new one. But I need to shift all original Revit planes becase of all links and elements based on them.
Any sugestions?

Apparently there are not yet nodes using the method ElementTransformUtils.MoveElement, all the translations node are moving the geometry, not the Revit element.

http://www.revitapidocs.com/2018.1/aaddd413-01b0-2878-3f79-a281abb6d364.htm

Said that, the python node is quite easy:

import clr

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *

clr.AddReference('System')
from System.Collections.Generic import List

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

elements = UnwrapElement(IN[0])
vect = UnwrapElement(IN[1]).ToXyz()

TransactionManager.Instance.EnsureInTransaction(doc)

for e in elements:
	move = ElementTransformUtils.MoveElement(doc, e.Id, vect)

TransactionManager.Instance.TransactionTaskDone()

OUT = elements

MoveElement.dyn (7.6 KB)

3 Likes

Nice python script, but chances are the OOTB Element.MoveByVector node does the same.
:wink:

2 Likes

@Alban_de_Chasteigner, I would like to blame the Dynamo search engine and the 8 working hours, but this is really embarrassing :sweat_smile:
However a good lesson for the future, thanks!

3 Likes

Thanks a lot for your help!
Can’t believe that I miss thiss node …