Creating blockreferences from solids with dynamo

Hi guys, how are you?

I’m trying to create a BlockReference from some solids I got, but its REALLY not working rn… I’m using the "BlockReference.byGeometry with the direct object that I get selecting my solid with “Select objects” and the BlockReferences indeed get created, but without any geometry inside. When I try to use the object.geometry node to extract the geometry from solids, my civil3D crashes. And when I try to directly apply the “BlockReferenceExtension.ByObject”, i get an error “Object Reference not defined for an object instance” (or something really close to this).

Anyone can help me here?

Thanks!

EDIT:

From what i read, looks like this isn’t quite possible yet, so, is scripting the way to go? any help on how should I start/search for it? Just need it to loop throught all my solids (694), converting them into separate blocks

you need to first extract the Geometry of the AutoCAD Solids and create the correspondent Dynamo Solids, after that you can use the BlockReference.ByGeometry

Hi Paolo, thanks for the answer. For some reason my dynamo (and civil3D) were insta crashing when I tried to extract the geometry, but I tried it in another workstation and it worked (sadly I had already made something like 6k blocks by hand hahaha). Now i’m trying to make each input of my objects to be a separate blockreference. I Thought the “Append” input into BlockReferenceExtension.ByGeometry was supposed to do this, but I changed it and no good. Right now i’m trying to loop it into a custom node, so I can pass each input at a time, but I can’t make the loop while node work properly. Do I have to use a passthrough in this situation, so my second input goes in after my first one has already been made a BlockReference?

Thanks in advance!

EDIT: I Managed to do it, just needed to chop my selection and work with the 2nd level. Thanks guys

Hey @guilhermeJHXAW. I am having same issue. It is creating a single block with all the solids. Do you solve this?

1 Like