Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Peter Poulsen on April 24, 2013, 10:58:41 pm

Title: %FINDLAST macro like feature?
Post by: Peter Poulsen on April 24, 2013, 10:58:41 pm
Hi

I'm rather new in MDA Transformations and misses a macro that can give me the last part of a string. Is there an easy way to get the last section in the packagePath like dk.schema.products.car?

I can imagine something like
$lastIdx = %FINDLAST(packagePath, ".")%
$lastIdx = %LENGTH(packagePath) - $lastIdx%
$section = %RIGHT(packagePath, $lastIdx)%