Matching duplicate object names and drawing line between them

Hi, I have produced an animation on C4D where bricks have moved from one location to a other. I have imported both frames of the animation into rhino on 2 different layers. Each brick has a specific Object Name which matches its twin on both layers.

I want to make a list in which grasshopper can find matching bricks by Object Name then draw a line between both bricks (their centre).

Is this possible? Thanks!

Pretty straight forward. Please post some sort of example geometry.

  private void RunScript(Guid guid, ref object Name)
  {
    Name = this.RhinoDocument.Objects.FindId(guid).Attributes.Name;
  }

And then work with sets on gh…
(Geometry pipeline output is also geometry)

As the real file has 10000+ bricks, here is a simplified example. Cheers!

bricks.3dm (55.3 KB)

Requires Elefront

One thing you may want to do is gather all the names and create a Set of the unique & then sort (number or text)

That works great, thanks for that!