@silvia_aldrighetti_1 wrote:
.... the actual lengths of the segments it creates from the selected line are never of the length that I input with "M", but always slightly less. I was wondering if there is a way (or another LISP) that allows to create the various segments of the lenght I choose. ....
That's what the M stands for - Maximum, meaning "break this into the smallest number of equal-length pieces such that their length does not exceed the Maximum I specified." It's a Maximum, not a fixed length. Of course, they're not always slightly less, but will be whenever the overall length is not a clean multiple of the Maximum length specified. And they could be more than slightly less, depending on the relationship of current length to Maximum. [For instance, if you use it on a 10-unit-long object, and specify a Maximum segment length of 9 units, the result will be two pieces of only 5 units, because it has to do two pieces or the result would exceed the Maximum.]
It's designed for equal-length results. If you want a specific length rather than a Maximum, except when the overall length is a clean multiple of that you will get all but one segment at that specific length, and one shorter, with how much shorter varying all over the map. Is that what you want? That could be done, but there's also the question of whether you would care at which end the shorter resulting segment falls.
Kent Cooper, AIA