Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Diesel expression that gets part of a file name and adds a character

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
chris.slattery
385 Views, 3 Replies

Diesel expression that gets part of a file name and adds a character

I have a diesel expression that is retrieving the first 5 characters of the file name. I do not want to change the file name, I would like to add a dash between the first and second characters of the file name within the diesel expression.

example file name TXXXX ABCDEF.dwg. I am trying to get the displayed text to be T-XXXX.

3 REPLIES 3
Message 2 of 4
hmsilva
in reply to: chris.slattery

Try

$(substr, $(getvar, dwgname), 2, 1,)-$(substr, $(getvar, dwgname), 3, 4,)

Hope this helps,
Henrique

EESignature

Message 3 of 4

Thanks hmsilva, this is what I was looking for.

Message 4 of 4
hmsilva
in reply to: chris.slattery


@chris.slattery wrote:

Thanks hmsilva, this is what I was looking for.


You're welcome, @chris.slattery 
Glad I could help

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report