Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Attribute block text auto update Diesel expression for this scenario?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
b1_
Contributor
438 Views, 2 Replies

Attribute block text auto update Diesel expression for this scenario?

Our file name is this:

1807_WD3012_Basement_Site_Plan.dwg

Our Diesel expression is this: 

$(substr,$(getvar,dwgname),1,$(-, $(strlen,$(getvar,dwgname)), $(-, $(strlen,$(getvar,dwgname)),11)))

It grabs the first 11 characters of teh file name.

 

What Diesel expression do I need to only grab "3012" from "1807_WD3012_Basement_Site_Plan.dwg"?

(The first 11 characters will stay constant for all files).

 

(

Our field expression in the Field dialogue box is this, if it means anything:

%<\AcDiesel $(substr,$(getvar,dwgname),1,$(-, $(strlen,$(getvar,dwgname)), $(-, $(strlen,$(getvar,dwgname)),11)))>%

)

Tags (1)
2 REPLIES 2
Message 2 of 3
user181
in reply to: b1_

Try this: 

$(substr,$(getvar,dwgname),8,4)

EESignature


Message 3 of 3
b1_
Contributor
in reply to: user181

Thx, that worked a treat.

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

Post to forums  

Forma Design Contest


AutoCAD Beta