With the newest udpate for Revit 2021 and Dynamo you can use scripts to Calculate Longest Distance within your model.

Watch this short video on how to do this.