Jump to content

Recommended Posts

Posted

Looking to create a diesel expression for a file name in order to display just the first 10 spaces. the file names vary in length so a "set" standard of subtracting will not work for me. 

ex. mem-eng-001 cabinet bom.dwg

      mem-eng-002 XXX view for cabinet 03 topdown view.dwg

the current expression I am trying to get to work is 

$(substr,$(getvar,"dwgname"),1,$(-,$(strlen,$(getvar,"dwgname")),4))
I figure it is either something simple I am just not seeing or it is something else entirely. so any help that can be provided is appreciated. 

Posted
2 hours ago, Travis_M said:

Looking to create a diesel expression for a file name in order to display just the first 10 spaces.

 

 

Substr

Returns the substring of string , starting at character start and extending for length characters.

$(substr, string, start [, length])

Characters in the string are numbered from 1. If length is omitted, it returns the entire remaining length of the string.

$(substr,$(getvar,"dwgname"),1,10)
  • Like 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...