I can’t display the length after the line is drawn, but I’ve already checked the “length” option.My version is slicer 5.6.1 apple version
Are you by chance using SlicerMorph? Or trying to use undo/redo functionality for Markups module objects which includes the Line object?
This seems reminiscent of the following post:
However the above resulted in a change to the SlicerMorphRC file which should be used in the latest Slicer 5.6.1 assuming you re-installed SlicerMorph using the Slicer extensions manager which pulls the latest from the internet.
I can confirm that in 5.6.1 if the SlicerMorph customizations are used, undo is only enabled for fiducial objects, and measurements are displayed correctly for line objects.