Attribute block text auto update Diesel expression for this scenario?

Attribute block text auto update Diesel expression for this scenario?

b1_
Contributor Contributor
732 Views
2 Replies
Message 1 of 3

Attribute block text auto update Diesel expression for this scenario?

b1_
Contributor
Contributor

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)))>%

)

0 Likes
Accepted solutions (1)
733 Views
2 Replies
Replies (2)
Message 2 of 3

user181
Mentor
Mentor
Accepted solution

Try this: 

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

0 Likes
Message 3 of 3

b1_
Contributor
Contributor

Thx, that worked a treat.

0 Likes