Copy elements from linked model - wrong location

Hello everyone!

I found a script which can copy elements from linked model to new one.
It works, but with warnings; windows are copied, but aren’t in right location.

I made some test models and effect are always the same - windows are moved 30.48cm.
Maybe I do something wrong with inserting architectural model - I insert model by Projects Base Point to Projects Base Point.

Any ideas why it isn’t work?

I attach my test models - architectural and structural (before use script and after) and script.
link: https://www.dropbox.com/s/d99q8dclut8ktre/test.rar?dl=0

Best wishes
Jadwiga

thats one foot exactly
can it be a units thing?

Hello.

Try running this script in either of the projects and see if all of the numbers in the Linked Projects node match the ones in the Current Project node (particularly the Active Project Location). If they do not, that could be your problem.

Project Locations.dyn (15.3 KB)

@kennyb6
I can’t open this file.
In which version of Dynamo was make?

It was made in 2.0. I can upload a 1.3 version tomorrow.

Okay, I found another script which work correct.
Link: Batch copying elements from a linked file

But still I’m curious why previous script doesn’t work.
Where is the crucial difference?

Hey,

I would guess that it’s because of a shift in the Project North? One node might account for the difference between 2 files’ Project Norths, the other might not…

Hope that’s helpful,

Mark

…also, coming soon to BimorphNodes. Should be out some time before end of Q1. As BimorphNodes LinkElements contain all their transform data, this works out where their host location is by default, so the inputs are minimal, plus it optimises the copy process if you throw multiple linked elements from multiple different Linked files at it, i.e. it does all the transform and link doc data management internally:

3 Likes

Sounds awesome Thomas, thanks a lot! Can I get an auto notification when your package updates?

1 Like

Of course, there will be the obligatory post on the forum detailing all the updates (there’s some more goodies in the pipeline), I’ll cc you in the comments in any case when I announce the release.

3 Likes

Hi Thomas. Have you experienced issues with copying from one linked project to current when project base points match but project active locations differ?

This became an issue when trying to use nodes like Elements in spaces between a current and linked project. The linked project in a Revit view was in the correct place (based on project base point) but Dynamo saw the linked project at the project active location instead, so in Dynamo element locations did not match up.

Hi @kennyb6 yes that’s the Revit API ‘linked-element’ limitation which restricts elements from a linked file to their origin-to-origin location/source file coordinates rather then their host location in the active file. The transform property of the RevitLinkInstance however enables this to be corrected, and thats what this node uses - or rather, LinkElement instances store the transform - meaning the copy is positioned where you see it in your active file.

3 Likes

Awesome! That will save many headaches. Thank you!

Hey Thomas

Is there a way to copy elements from a linked view of a Revit link without the Linked view being visible in the host View?

Hello,

Was someone already able to resolve the issue of elements appearing in wrong location after copying? I tried already a lot of “solutions” that I found here but it is still copied to a wrong location. @Thomas_Mahon I also tried the nodes of BimorphNodes but without success. The files are linked by Project Base Point and Internal Origin is not at the same place for both models.

Thanks in advance

Hoi Allard,
There might be something useful in the Genius_Loci package.
Marcel

Transforming the elements will resolve differences in origins. This sounds like something else is going on with your files. Create a minimal reproducible case - i.e. 1 wall in a linked model which exhibits the behaviour you’ve observed and share the files.

1 Like

Hello Marcel,

I do not immediately find a node that can help me. Do you have one in mind?

Allard

Hello Thomas,

Here you have a link with the models. The goal is to import the elements from the opening model in the STRU model. Wetransfer Link

Allard

Hello Allard

I know where is the problem.
Your void family is base on level.
So, for correct program operation, you have to have in target model exactly the same level which is in sources model void element.

I copied level L090_Bestaand and then the BimorphNodes worked.

You could copy the level by Copy/Monitor or prepare Dynamo graph which read the source level, copy it and copy instance element.

I hope it will be helpfull.
Jadwiga

2 Likes