Travis_M Posted February 9, 2021 Posted February 9, 2021 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. Quote
steven-g Posted February 9, 2021 Posted February 9, 2021 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) 2 Quote
Recommended Posts
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.