AutoCAD 2013/2014/2015

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

Limit file name length

348 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: 68
Registered: ‎11-06-2008
Message 2 of 4 (330 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 (305 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: 68
Registered: ‎11-06-2008
Message 4 of 4 (264 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

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube