Automatic dimensioning of (multiple) detail lines

No problem! It is always possible to contribute to solve the issue with some efforts. Here is how to paste code in a post:

here are Python basics links if needed: