Hello Efecan
in the Dimension.ByElements node you need a Detailcurve or modelcurve (line) as an input for the line input and search on the forum there are a lot of exampels on how to dimension elements.