neuri Posted June 22, 2022 Share Posted June 22, 2022 I want to put the Revisions of a file name in to my title block using FIELDS so it auto updates everytime I revise the drawing but i only want the last letter of the file name. $(substr,$(getvar,dwgname),5,$(-,$(strlen,$(getvar,dwgname)),8)) I have been using this but my file names vary according to project names, is there a simpler way to just get the last letter of every file name? Quote Link to comment Share on other sites More sharing options...
SLW210 Posted June 22, 2022 Share Posted June 22, 2022 I have moved your thread to the CUI, Hatches, Linetypes, Scripts & Macros Forum. I have a thread or two around somewhere explaining how that DIESEL works to modify the DWGNAME. If I get time, I'll see what I can find. What you want, may need LISP. Can you post some examples and a .dwg? 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 23, 2022 Share Posted June 23, 2022 Hmmm (setq str (cdr (assoc 1 (entget (car (entsel "\nPick a text ")))))) (setq tlast (substr str (strlen str))) Quote Link to comment Share on other sites More sharing options...
neuri Posted June 24, 2022 Author Share Posted June 24, 2022 (edited) Thanks, but I googled abit more while waiting for a reply and found this expression that worked. It is below for anyone else who might be searching for something similar. $(substr,$(getvar,dwgname),$(-,$(strlen,$(getvar,dwgname)),4),1) Edited June 24, 2022 by neuri 1 Quote Link to comment Share on other sites More sharing options...
SLW210 Posted June 24, 2022 Share Posted June 24, 2022 Sorry, I was busy last few days. See this thread...shortening fields in attributes - AutoCAD Drawing Management & Output - AutoCAD Forums (cadtutor.net) 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.