I haven’t found too many references about the custom node input setting. Is it possible to set upper and lower number limits like integer slider on the Input node? or I should add if . . else node inside the custom node to filter out the input values beyond the limits?
If you are not going to do your custom node in via Dynamo’s custom UI node development, you will always filter the inputs to your bounds/limits. You will have to use IF (or equivalent logic/method) statements either you make nodes via python script, zero touch node development or custom node through OOTB.
you can use this script: input_bounds.dyn (22.6 KB)
it can also check if your input is also a list,
input = IN output = None minValue = IN maxValue = IN if isinstance(input, list): output = list() for a in input: if a < minValue: output.append(minValue) elif a > maxValue: output.append(maxValue) else: output.append(a) else: if input < minValue: output = minValue elif input > maxValue: output = maxValue else: output = input OUT = output
Let me try this script. It looks more professional coding than my version.