I’m trying to create blocks using the Block.Reference.Create command, where I have a tree block and using the coordinates extracted from a corridor feature line.
However, when executing the code, the following message appears:
Warning: BlockReference.Create operation failed.
eInvalidInput
Can anybody help me?
Try using the BlockReference.ByCoordinateSystem node instead of BlockReference.Create. Then plug in the coordinate system node you have on the far left of the image in your post.
Thanks for the tip!
I used the 'Block Reference.ByCoordinateSystem node and the problem in Dynamo remained, however the blocks were created in civil 3d and I had not seen it.
![Capturar2|358x500]
I have the same problem can some one please help us
Points are NOT CoordinateSystems
Back to the original node, why is the BlockReference.Create node not working? I have a point in the position input, which the node is calling for a Designscript.geometry.point. The error goes away when I remove the Modelspace block- but what block is it looking for?
The block input is the block that you want to create the block reference in. So you can plug in any block definition there as the “container” that holds the block reference. Model space itself is a block, as is any paper space layout.
The sourceBlock input is the block definition you’re trying to create a block reference for. You can’t “select” a block definition using the Select Object node, so that is probably where the issue lies. You’d need to use something like Document.BlockByName to get the block definition you’re interested in.
You’ll see that same block input on most nodes that create objects, and in the majority of cases you are probably wanting to create things in model space. But there is flexibility to create objects in any block. Note that in Civil 3D 2025.1 we added default values to those inputs so that they default to model space, which saves a few nodes in many cases.