How to use Diesel expression for part of file name for title block attribute

How to use Diesel expression for part of file name for title block attribute

Tyler.eurich
Observer Observer
490 Views
1 Reply
Message 1 of 2

How to use Diesel expression for part of file name for title block attribute

Tyler.eurich
Observer
Observer

Hello, 

I currently have the title blocks for the company that I work for set up with diesel expressions to use the file name for attributes for the filename and drawing number.

 

Our filename template is XXXXXX-ZZZEPP.DWG.

XXXXXX is the drawing

-ZZZ is the sub-assembly 

ans PP Is the sheet number (E stands for electrical)

 

The diesel expression I am using to get the drawing number is $(substr,$(getvar,"dwgname"),1,$(-,$(strlen,$(getvar,"dwgname")),7))

I need a diesel expression for the sheet number attribute from the file name, which would be characters 12-13 of 17 total.

 

Any help is appreciated

 

0 Likes
491 Views
1 Reply
Reply (1)
Message 2 of 2

cadffm
Consultant
Consultant

1000 times edited

 

 

STRLEN SUBSTR GETVAR

https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-F94A885A-4DA2-432B-AC1A-EB49CC6C1C72

 

 

Fix filename length?

$(substr,$(getvar,dwgname),12,2)

 

 

variable length

$(substr,$(getvar,dwgname),$(-,$(strlen,$(getvar,dwgname)),2),2)

 
 

 

 

Sebastian

0 Likes