Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Diesel macro for renaming blocks not working

2 REPLIES 2
Reply
Message 1 of 3
bgingerich
304 Views, 2 Replies

Diesel macro for renaming blocks not working

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!

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich
2 REPLIES 2
Message 2 of 3
pendean
in reply to: bgingerich

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?

Message 3 of 3
bgingerich
in reply to: pendean

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.

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost