MPS Template use of parameter

179 Views Asked by At

In MPS I have defined a template:

template reduce_Car
Input Car

parameters
color : String

<TF [<Car>???</Car>] TF>

Now I wanted to use the defined parameter "color" in my template?

1

There are 1 best solutions below

0
On BEST ANSWER

You access parameters through genContext. So wrap the text to replace with a property macro

<TF [<Car>$[red]</Car>] TF>

and down in the Inspector for the property macro access the parameter as 'genContext.color'