CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.091.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedDiesel Expression

 Post Reply Post Reply
Author
oksijen View Drop Down
Newbie
Newbie


Joined: 15.May.2014
Location: Turkey
Using: AutoCad2013
Status: Offline
Points: 3
Direct Link To This Post Topic: Diesel Expression
    Posted: 02.Feb.2015 at 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)
Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2020, 2023
Status: Offline
Points: 685
Direct Link To This Post Posted: 03.Feb.2015 at 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"
Back to Top
oksijen View Drop Down
Newbie
Newbie


Joined: 15.May.2014
Location: Turkey
Using: AutoCad2013
Status: Offline
Points: 3
Direct Link To This Post Posted: 03.Feb.2015 at 22:48
Thank you Kent Cooper,
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,102 seconds.