Display full version of the post: Diesel Expression

oksijen
02.02.2015, 20:24
Hello,AutoCAD file name (diesel expression) I wrote with. However, after the file name (.dwg) I want to hide the extension. Can you help? Thank you.$(substr,$(getvar,DWGNAME),4,8)

Kent Cooper
03.02.2015, 15:15
If you mean that you want the drawing name by itself, without the .dwg filetype extension, here is a way to do it in AutoLISP [I'm not versed in Diesel enough to be confident of expressing it correctly, so I hope you can convert it]:
 
(substr (getvar 'dwgname) 1 (- (strlen (getvar 'dwgname)) 4))
 
If you do that in an initial unsaved drawing, it returns:
"Drawing1"

oksijen
03.02.2015, 22:48
Thank you Kent Cooper,