Welcome to the forum!
It’s always best to search for similar topics, even if just to see how other people are using the same nodes or similar workflows.
You’re missing essentially all of your inputs currently.
- The
Document.ActiveViewnode requires a document to get the active view.Document.Currentwill give you that. - The
lineinput is the line describing where the dimension will be placed. You’ll need to figure out how you want that to be determined and then develop some logic to get that from your elements. A generic approach would be to create a line based on the references and the location of the instance, along with an offset so as not to overlap the geometry. - You have the right idea for
references, but you’re not getting them correctly. You’re identifying the references by name, which means you need to check theReferenceNamelist instead of the elements themselves. Then you’ll have to actually get the matchingReferenceby it’s index with something likeGetItemAtIndex. - You also need to provide the
DimensionTypefor the dimension itself. Archilab has aGet All Dimension Stylesnode that gathers all the dimension types in your project. You’ll still need to determine which one you want to use and either manually select it or use something like name matching to automate it.