- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there a way of using Diesel Expressions to adapt to variable length filenames?
My company mainly uses 5 digit project codes, eg 12345. Quite often we have to add a -00X to the project code eg 12345-001.
So in the following filename:
12345-ABC-ZZ-03-M2-Y-00001-IPMS3-S3-P01
becomes
12345-001-ABC-ZZ-03-M2-Y-00001-IPMS3-S3-P01
When the longer project name is used I lose part of it in my title block, see below:
From:
to
I
The PC Project Code in the second image should display 12345-001
and I'm losing 4 characters in the Drawing No.
The Diesel expression for the PC Project No. is currently $(substr,$(getvar,dwgname),1,5) this obviously works ok for the 5-character project number but not the 9-character.
The Diesel expression for the Drawing No. is currently $(substr,$(getvar,dwgname),1,15) this obviously works ok for the 5-character project number but not the 9-character.
I don't want to have create sperate templates for different length project numbers as we have enough already.
Thanks in anticipation.
AutoCAD 2021
Solved! Go to Solution.