Yes!
There are two cases:
- You know which rule to apply:
thisRule = transformation.GetRuleByName("myRule")
thisRule.Apply(param1, param2, ...)
Make sure that the rule parameters param1, param2, ... are of the right type!
- You don't know which rule to apply:
rules = transformation.GetRulesWithParams(0)
rules[0].Apply()
In this case might only use rules that have no parameters since you have to provide the rule parameter of the right type. Here, all rules with no parameters are stored in the list rule
and the first one is applied. You can also get the rules' names using rules[0].Name
.