Reputation: 1213
Is there a way to call a rule (or multiple rules) in a script and execute it?
Please note: The booggie-project does not exist anymore but led to the development of Soley Studio which covers the same functionality.
Upvotes: 1
Views: 34
Reputation: 1213
Yes!
There are two cases:
thisRule = transformation.GetRuleByName("myRule")
thisRule.Apply(param1, param2, ...)
Make sure that the rule parameters param1, param2, ... are of the right type!
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
.
Upvotes: 1