The way to do this very efficiently is to create a table and add extract all the lengths from each line into the table and then add up all the segment lengths to get the total length.
Firstly, you need to make sure the lines you want to measure is placed in a layer. In the example below I have a couple of layers and the layer containing the lines are called “Panels_201”
Now start up the Table tool and select the “From object data in the drawing” option. Click Ok.
On page 1 make sure ‘Create new data extraction” is selected and click Next.
Name the data extraction and click Save.
In the next page leave everything default and click Next.
In the next screen make sure all the items are ticked inside the ‘Select Objects to extract from’ area. Click Next.
In Page 4 of 8 right click in the main area and select ‘Uncheck All’.
Make sure only two object properties: Layer and Length are ticked. See below. Click Next.
Click OK to the notification about blocks. Click Next.
In the next dialogue box you can right click on the Layer column and select Filter.
In the rule set it equal to Panels_201 layer. This will exclude all the element from all the layers except those from Layer called Panels_201.
Now right click on the Length column and add a Sum formula.
You’ll now have a sum of all the lengths of the items in layer called Panels_201.
Now click Next and decide if you want to add it as a table and or export it. We have just ticket to add into the drawing. Click Next.
Select the Table Style and click Next.
Click Next and Finish. Now place the table in the drawing.