AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

Reply
Member
KrisP007
Posts: 3
Registered: ‎06-21-2012
Message 1 of 2 (189 Views)
Accepted Solution

block attribute formulelike this text = right(text;4)

189 Views, 1 Replies
10-04-2012 06:48 AM

hi

 

i have a titelblock whit an attribute definition -> filename ->Uppercase

the result is a full path

wath i want is just te last 4

 

ex  D:\folder\folder\folder\projectname\index0051\filename

i want the atribute value to be 0051

 

can someone help me?

 

kris.

In a field in the attribute value, select diesel expression and paste the following

$(substr,$(getvar,Dwgprefix),$(-,$(strlen,$(getvar,Dwgprefix)),4),4)

It should do what you want

Distinguished Mentor
steven-g
Posts: 576
Registered: ‎05-11-2009
Message 2 of 2 (172 Views)

Re: block attribute formulelike this text = right(text;4)

10-04-2012 12:33 PM in reply to: KrisP007

In a field in the attribute value, select diesel expression and paste the following

$(substr,$(getvar,Dwgprefix),$(-,$(strlen,$(getvar,Dwgprefix)),4),4)

It should do what you want

Regards Steven Gray
Setting Out (Joinery Manufacturing)
Autocad 2013LT
Windows 7 professional
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.