I've messed around with Diesel before, but this has me stumped. I'm putting this code in a button:
^C^C-rename;block;\;$(upper,$(substr,$(getvar,dwgname),$(-,$(strlen,$(getvar,dwgname)),4),1))
I tested the Diesel expression in the Modemacro variable and it returns the dwg size from the file name (5th character from the end) like it's supposed to, but when I run the command, it says "Invalid block name." Tried putting $M=, $(eval,...), and $M=$(eval,...) in front to no avail.
Any help would be much appreciated!
What do you want the block name to read exactly?
And if I may ask, why do you want a block to have that for a block name?
The block name should only be one letter long. The drawing sheet size (A, B, C, or D) taken from the file name (e.g. drawing_D.dwg).
In answer to your second question: I am renaming our title blocks and trying to set standards to the pile of drawings that have been through three different companies. It looks like only the first on had any drawing standards and the others only attempted (very poorly) to carry these on. But all that aside, I'd eventually like to have layouts based on the dwg sheet size and the scale of the border.
So now all the background info is out there.