zospy.api.constants.process_constant#
- zospy.api.constants.process_constant(constant: type[Constant], value: Constant | str | None) Constant#
Get member value from constant.
value can be a constant, a string representing the constant, or None. If value is a string, the constant with the same name is returned. If value is None, the constant None_ is returned.
- Parameters:
- constanttype[Constant]
The type of the constant to be processed.
- valueConstant | str | None
The value to be processed. Can be a constant, a string representing the constant, or None.
- Returns:
- Constant
The processed constant value.
- Raises:
- ValueError
If the value does not match any attribute of the constant type.