changing Parameters
Fireholder
New Altair Community Member
Hi,
I'm trying to modify my Parameters using Operator.setParameter(x,y), however I have encountered several problems.
When I change the values of some parameters and run the process, RM throws error, I suggest that change of some parameters prompt change in others. How can I know what is the bond between parameters?
br, Fire
I'm trying to modify my Parameters using Operator.setParameter(x,y), however I have encountered several problems.
When I change the values of some parameters and run the process, RM throws error, I suggest that change of some parameters prompt change in others. How can I know what is the bond between parameters?
br, Fire
0
Answers
-
Hi,
there is no "if you change x it will change y". Some parameters depend on others, so y may be hidden while x is false, but in that case y would simply be ignored. You probably put an invalid value into them, like "hello" into a ParameterTypeInt (which of course only accepts integer values).
Regards,
Marco0 -
Hi,
I guess I misinterpreted my problem. What I really want to know is how are parameters of some operators interrelated.For instance, when I change parameter "send_mail" from "never" to "for_long_process" in operator Process (Root operator) two other parameters,the "notification_email" and the "process_duration_for_mail", immediately appear.
I have found something like parametertype.getDependency() but don't really understand how to use it,any suggestion?0 -
Hi,
I think you can try to ask every parameter of an operator via this code fragment if it should be shown everytime you change a parameter.
I haven't done this myself before, so you will have to play around with this a bit.
Regards,
for (ParameterType type : operator.getParameterTypes()) {
boolean showParam = true;
for (ParameterCondition condition : type.getDependencyConditions()) {
if(!condition.dependencyMet()) {
showParam = false;
break;
}
// your code
}
}
Marco0