How to insert BlockReference from python

Is there a way to insert a block reference from python? Im able to add attribute tags or set dynamic properties to existing blocks easily, but cant seem to replace the BlockReference.ByCoordinateSystem() block with a line of python code. Anyone have a way?

Thanks in advance!


@WWentzler here’s a simple example:

import clr
from Autodesk.AutoCAD.DynamoNodes import *

sourceBlock = IN[0]
coordinateSystem = IN[1]
layer = IN[2]

OUT = BlockReference.ByCoordinateSystem(sourceBlock, coordinateSystem, layer, Document.Current.ModelSpace)


Huge thank you! I thought it should be this simple, but was missing the import …DynamoNodes … at the top. This makes things much better. Thanks!!