Create a linked block containing linked blocks

This is basically a continuation of this thread on the old forum: Baking Nested Linked Blocks - Grasshopper

I am trying to do the same, but not having any luck.

I have created some linked blocks and have placed them in the Rhino Doc. Now I want to reference those in GH, which also works fine. Then I want to define a new linked block, which contains the other linked blocks.

But I am always getting the dreaded “Something went wrong. Please double-triple check…”

The data tree structure could not be simpler in this case. 4 blocks and one name, one file location and one set of default attributes.

Any help is much appreciated. Is this even possible with Elefront? In the old forum post Ramon van der Heijden makes it sound like it should work as long as you have the instances placed in Rhino.

This is indeed possible. The trick is that you should use “Insert Block” instead of “Import Linked Block”.

“Import Linked Block” is designed for linking and instantiating a block that is not already in your document. It can also handle scenarios where instance do already exist, but the point is that the component outputs the information from the external file without it being an actual instance of the block itself (because it’s base assumption is that it doesn’t yet exist in your file).

For handling blocks that are already defined in your document, you want to use “Insert Block”, because then it knows that the definition is for sure available.

For nesting blocks, you’re correct that you need to have the sub-block already defined in your document (which you’ve done), and then, since you’ll be operating on pre-defined blocks, you want to use “Insert Block” instead of “Import Linked Block”. Hopefully that solves the issue!

2 Likes

Hi Armin
Did you ever succeed making a block out of nested blocks ?
I have tried to do the same with linked blocks already in the rhino document but cannot get it to work with insert block as recommended by Keyan.
When I try to bake the block it is still treated as 3 branches and I cannot work out how to match the tree structure with attributes.
Maybe I should not be using Merge…

I seem to remember that the tree of Attributes and Objects needs to match. If you want 3 objects in one block you can group them together first. If you want 3 separate blocks you best create 3 branches and then match the number of attributes. From what I remember you want what goes into Geometry and Attributes to be the same tree. You can use Duplicate Data together with list length. Then if its a tree I usually use Match Tree from the Human plugin. I actually find the components from the Human plugin regarding Blocks a bit easier to work with.

I hope that helps. Otherwise you would have to attach your Rhino and GH file and I could take a look.

Thanks, group seems the easiest approach…I got in a muddle trying duplicate date

1 Like