Elements in Linked Spaces


I am trying to get all of the elements located within each space, except that the spaces and their boundaries are from a linked instance. I’ve been looking through previous posts but most are the opposite, where the elements (in this case Electrical Equipment) are from the linked file and the spaces in the current doc. Or the posts are outdated and the packages are a few years old/wrong version.

I tried using Springs.Collector.LinkedInstanceElements but couple problems:

  • Gets me the elements but cannot use with Archi-lab’s Elements in Space or Clockwork’s Room.Boundaries
  • Using the geometry for intersection is too inefficient and the geometry is unreliable (some nulls, some solids, some lines, etc)

I am using Revit 2017 with Dynamo 2.0. Any help would be appreciated, thank you.

Where I am stuck:

Found the problem with the Room.Boundaries from Clockwork. I had to flatten the space list from Springs.Collector.LinkedInstanceElements in order for it to work. Would still prefer to use Archi-lab’s Elements in Space instead of trying to find if a point is within boundary lines, if anyone can help me figure out how to work it. Maybe @Konrad_K_Sobon can help?

Gonna keep updating my post if no one minds. I tried creating the space separators using the Clockwork nodes and found out the space separators don’t match the location of the linked file, but I am not sure where the problem of that occurs. I don’t know if it is from the SpaceSeparator.FromCurve node or just because of a linked instance.


Hi @kennyb6, can you upload your graph and rvt file? :slight_smile:

I haven’t seen this problem before maybe others have, but i will def. take a look at it when I’m near Dynamo again.

Sorry, I can’t share the rvt file and will take me a bit to make an example to show whats wrong so that will come soon.

I did find something interesting, though. Even though I feed Archilab’s Elements in Space node a list of spaces, it will use any spaces in the project, even overwriting the index of whatever space was in that list with what spaces are in the project.

More detail: My space input was all of the spaces from the linked instance using Spring’s collector and the element input was a list of electrical equipment in the current project. I created a space in the current project but it was not in the input list. When I ran the graph, the space list in the output had the newly created space and its elements overwriting the index 1 of the linked space list (same number parameter).

I tried creating a sample revit project but my script works on it so I guess the problem isn’t my method but the Revit projects themselves.

Great! :slight_smile:

but strange with your problem.

Thanks for your replies.

So the error is that despite the linked instance matching up in the current project, when I extract the location of things in Dynamo, it appears in a different location. So nothing wrong with the nodes, but I can’t figure out how to fix this. Both files share the same survey point and project base point.

1 Like

Figured it out, took me way too long to find it. Despite project base point being the same, the (active?) project location was 100000 off.

1 Like

Hi Kenny.

Could you send a capture of your solution?
I tried to move the spaces of linked model but I couldn´t do it because the “attempt to modify the model outside of transaction” warning in a Element.MoveByVector node

Have you tried applying transformation acquired from Transform output of the Linked Instance? I am not sure with this particular node, but within Revit Api each linked instance has a transform that can be applied to elements position to get their correct location in the base file.