Moving part of model + annotations

Hi all ,

I did post a question which was in part this issue … however I don’t think it was really asked correctly to explain the context of my issue, so it is being reasked (Select annotations by associated revit id of modelled element)

At work we have an issue that we have received a new survey (at a ridiculously late stage of the project) which relates to part of our project. (i.e. part of our building is to move, part is to remain at the same location)

Our issue is that when we move the modelled elements we are getting 2000+ errors of dimensions and tags which are being lost. Over perhaps hundreds of drawing sheets.

Even thinking about the time required to check all sheets and redimension and retag everything is eye watering. We thought about splitting the model into two and moving the base point, but given we have many linked models, this again would have a huge knock on effect across all other models / drawings.

Since having asked the original question yesterday a chance comment has made us change tack. In that we can extract the id’s of everything being deleted simply from the soft warning error message when moving, so if we know what we’re moving and what will be deleted, this is surely some pretty solid info to try to make a start.

(The previous idea was to try to find a way to find out what all the tag / dimensions in the project are hosted by. Then produce a list of selected elements. Then filter the annotative objects by their hosted / dimensioned object if contained within list of selected objects - if this is badly explained ignore as we have a new more straight forward plan …i think)

So the plan now is …

  1. select model elements and export id’s to excel (modelled id’s)

  2. move modelled elements and export error list of id’s of annotative elements to excel (annotative id’s)

  3. cancel move

  4. combine lists of modelled and annotative id’s

  5. move both modelled and annotative elements in one go

  6. hope for the best !!!


Currently I’ve exported a list of selected elements to excel and then read them back. Due to their being multiple types of elements I’m having trouble moving all these varying types. This is just considering modelled elements not annotative elements yet.

How feasible does anyone think this is? Given the number of hours required to reinstate all the drawings manually it would be worth investing the time to pursue this avenue. However I thought I’d ask the collective mind’s feasibility of this or whether the best advice is to simply get over losses, begin amending drawings immediately.

Yours in hope

J-P

For me i think by the way you explained its very complicated to a very simple solution. Have you consider shared coordinates? Reacquire coordinates? Ive done this alot of times…i mean the pain…but in the end i made a workflow that works everytime. Not using dynamo or codes…just an autocad drawing with couple of lines and text thats located in the correct world coordinates (ITM or UTM)…then reacquire coordinates and eureka…revit model is now in the new location…i hope you understand how this things work dont you? You know that the model DOES NOT ACTUALLY MOVE when you reacquire coordinates?

In your case you can make a copy of the existing model (duplicate) then delete the ones you dont need from the model thats moving and the same with the duplicate. So you will have two models, then the newly created model with the one you need to move reacquire coordinates. Then once thats done link that to your old model…thats it should work for you. Try it and see. Unless you want to do what you asking above…

Just trying to help…

Hi 4bimfercesp

I understand that shared co-ordinates does not change anything in relation to the revit origin.

Our issue is moving part of the model not the entire model.

In terms of duplicating models, we considered

(a) duplicate the model - dividing one model into two… change shared co-ordinates of affected piece and relink. However the impact across the whole team and consulatants etc of having to relink new model and then dealing with view templates and linked views etc would be more of a hassle than our team simply dealing with reinstating our drawings (when i say hundreds of drawing, that’s my teams bit, there are many hundreds across the entire project + consultants etc…) Also we started out without using linked views. The move is only 90mm so many tags will remain in other larger scale drawings. If we split the model, id’s change, annotation gone.

(b) duplicate the model, move shared co-ordinates and copy and paste in place affected elements back into original file. In this case again id’s changed, annotation gone

I think (b) option then could be a runner.

Currently we are doing the same on one of our project. Where we copy in place as built part of a model.

Either way you still spend time and money…i hope you are getting paid…goodluck

Hi.
For the elements themselves can you use one of the multiple select nodes or add a project parameter to enable them to be easily filtered, get their hosted annotations, combine the lists and add save it as a selection set. Then you can move everything throughout the project at the same time by “loading” this set? Just a thought, sounds like you have a complex project there.

1 Like

how do you create a selection set with Dynamo? I want to do what you describe, I posted here: Moving massive amount of Revit elements of any type from one point to other with Dynamo

Clockwork package has a few nodes regarding SelectionSets
image

mmm interesting, now how to move the Set?

You might want to try something before asking and show a bit of what you try. That is the whole point of forums.

obviously I tried everything I can before writting in a forum, just wanting to know if there are more possibilities that I do not know yet

I have a python code that does not work now in Revit 2021, but it seems it worked well before.

image

if you can fix it, I would appreciate it very much

try this from Modelical

# This node has been made by Modelical
# www.modelical.com
import clr

#Load Dynamo wrappers
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

#Load Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

#Load document reference
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from System.Collections.Generic import *

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

def toList(input):
	if isinstance(input,list) == False:
		return [input]
	else:
		return input

def flatten(x):
    result = []
    for el in x:
        if hasattr(el, "__iter__") and not isinstance(el, basestring):
            result.extend(flatten(el))
        else:
            result.append(el)
    return result

elementsOrIDs = flatten(toList(IN[0]))

elementIds = List[ElementId]()

try:
	int(elementsOrIDs[0])

except:
	for e in elementsOrIDs:
		elementIds.Add(UnwrapElement(e).Id)
	selection = uidoc.Selection.SetElementIds(elementIds)
	
else:
	for ID in elementsOrIDs:
		elementIds.Add(Autodesk.Revit.DB.ElementId(int(ID)))
	selection = uidoc.Selection.SetElementIds(elementIds)


OUT = IN[0]

I tried this

but I am not able to move a selection filter because the error:

Warning: Element.MoveByVector operation failed.
Object reference not set to an instance of an object.

that seems a Revit joke

the selection set is just a list of elements (understand it as a container of object, not an object in itself), it cannot be moved in itself.
The elements contained by the selection set can be moved.