Jump to content

Recommended Posts

Posted

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?

Posted

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?

 

 

  • Like 1
Posted

Hmmm

 

(setq str (cdr (assoc 1 (entget (car (entsel "\nPick a text "))))))
(setq tlast (substr str (strlen str)))

 

Posted (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 by neuri
  • Like 1

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...