Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

wispoxy
en respuesta a: lee_pellegrin5UBS5

:cara_de_triunfo::cara_de_cansancio: :cara_llorando_a_mares::cara_llorando_a_mares:

Use substr function to extract a specific part. DIESEL does not have built-in functions to split a string by a diameter like "|". Therefore, to extract a specific ‘TEST#’ from your SSM variable, you would need to know the exact position and length of the ‘TEST#’ you want to extract.

 

$(substr, $(getvar, YOUR_VARIABLE_NAME), 7, 5)

 

In this expression, $(getvar, YOUR_VARIABLE_NAME) gets the value of your SSM variable, 7 is the start position of ‘Test2’ in the string (counting from 1), and 5 is the length of ‘Test2’.

Please replace YOUR_VARIABLE_NAME with the actual name of your SSM variable.

Remember that DIESEL has a limit of 10 parameters for all functions!!!!