Jump to content

Recommended Posts

Posted

I am trying to write a diesel expression that will extract the first part of the drawing file name. 

Full Drawing File Name: XXX-ZINC-XX-XX-DR-C-01000_S278 Sections

First Part:  XXX-ZINC-XX-XX-DR-C-

My question: Is there a smarter way to extract the first part rather than relaying on the number of characters? If everyone is following the correct naming protocol it would be 20 characters but sometimes you have people instead of -C- they put -CE- so I am wondering is there a way to future proof it.

 

Thank you.

 

$(substr,$(getvar,"dwgname"),1,20)

 

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...