Book a Demo

Author Topic: Code Template : String processing  (Read 4116 times)

Dobrin

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Code Template : String processing
« on: March 24, 2014, 08:19:05 pm »
Hello all,

I have a question regarding the Function Macros from Code Template.
Is it possible to process the string in a way to change the order of some sub-strings?

e.g :

Code: [Select]
$myString = "substring1,  substring2, substring3"
%SOME_FUNCTIONS($myString)%

After this processing the string will be :
Code: [Select]
$myString = "substring3,  substring2, substring1"

Is it possible to obtain this?

Thank you in advance for you answer!

Gruß
Dobrin

webfox

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Code Template : String processing
« Reply #1 on: March 24, 2014, 09:23:41 pm »
Hi,

I don't think it is. One thing you could do is write your own custom add-in implementing additional string manipulation as you require. You can then call your add-in from within a template using the following syntax:

Code: [Select]
$result = %EXEC_ADD_IN("AddInName","MethodName", Parameter1, Parameter2, ..., ParameterN)%

Information on add-in development can be found here: http://www.sparxsystems.com/enterprise_architect_user_guide/10/automation_and_scripting/addins_2.html.

Cheers,

Till