In my drawings I use a diesel expression to extract from the filename, only the final part that contains the client code.
Now I made a better version of it, but I don't know how to replace it quickly in my drawings, using a lisp.
I use:
$(substr,$(getvar,dwgname),$(-,$(strlen,$(getvar,dwgname)),9),6)
"Name of customer_24-999.dwg" -> 24-999 <--- OK
"Name of customer_24-1000.dwg" -> 4-1000 <---- Error
I solved it with:
$(if,$(substr,$(getvar,dwgname),$(-,$(strlen,$(getvar,dwgname)),7),1)"1",$(substr,$(getvar,dwgname),$(-,$(strlen,$(getvar,dwgname)),10),7),$(substr,$(getvar,dwgname),$(-,$(strlen,$(getvar,dwgname)),9),6))
"Name of customer_24-999.dwg" -> 24-999 <--- OK
"Name of customer_24-1000.dwg" -> 24-1000 <--- OK
If I try to extract DXF data I only get the text string (24-999) not the Diesel expression that creates it!
Prova. 24-999.dwg
Prova. 24-1000.dwg