Create a markup line after fiducial points being placed

I am working on a Python extension and was wondering how I could first drop any amount of fiducial nodes and then connect them manually with a line while showing the measurement?

Thank you so much.