@Anonymous wrote:
Is it possible to create a custom linestypes with text using a text mask?
No -- there's nothing in the format of linetype definitions to incorporate anything other than pen-down segments, pen-up segments [gaps], text elements and shapes.
You would probably need to make a piece of masked Text/Mtext, and use ARRAYPATH to place it along linework. You could also make the Text and mask into a Block and use DIVIDE or MEASURE, or without making them into a Block, use the Selection option in DIV+ or MEA+ from here. But an Associative ARRAYPATH result will adjust itself similarly to a custom linetype if you alter the linework, and it has the advantage that you can fine-tune the spacing of the arrayed objects separately for each element of linework.