AutoCAD 2013/2014/2015

AutoCAD 2013/2014/2015

Reply
New Member
Conveyor2
Posts: 2
Registered: ‎01-10-2013
Message 1 of 4 (429 Views)

Limit file name length

429 Views, 3 Replies
01-10-2013 07:41 PM

I have a drawing and I have a field calling up the path and file name.  Is their a way to limit the size of the path displayed?  For example, if my drawing is C:\users\name1\name2\name3\t4\new5.dwg, is their a way to only show ...\name3\t4\new5.dwg?

Valued Contributor
Neil47
Posts: 74
Registered: ‎11-06-2008
Message 2 of 4 (411 Views)

Re: Limit file name length

01-11-2013 02:41 AM in reply to: Conveyor2

Using DIESEL expression in you field will help point you in the right direction if you path names are all a consistent length

 

for example,

 

$(substr,%<\AcVar dwgprefix \f "%tc1">%,15)

 

will display the path from the 15th character

 

Also take a look at this link, one of the posts shows how to display a set number of characters from the end

 

http://forums.augi.com/archive/index.php/t-68125.html

 

 

 

 

New Member
Conveyor2
Posts: 2
Registered: ‎01-10-2013
Message 3 of 4 (386 Views)

Re: Limit file name length

01-12-2013 02:44 PM in reply to: Neil47

Close.  But I can't to constant characters because the directory names will always be a diferent length.  I can say i just want everything from the third or fouth "\" forward.  Would that help?

Valued Contributor
Neil47
Posts: 74
Registered: ‎11-06-2008
Message 4 of 4 (345 Views)

Re: Limit file name length

01-17-2013 06:54 AM in reply to: Conveyor2

I don't think it will be possible with diesel

 

I haven't much time at the moment to get too deep but there may be a solution here at this link

 

http://forums.augi.com/showthread.php?140905-Folder-Name-into-Text-Field

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.