In Illustrator, there is a very useful function Object > Expand which allow to use the eraser tool on a dashed line without shifting dashes everytime the line is cut.
I want to do the same job than the Expand function, but using javascript.
Is there a simple way to do that?
Or do you know how to separate each dash to a simple pathItem from the pathItem of the whole line?