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:

2 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.

2 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?