Operator Configuration#

class ansys.dpf.core.config.Config(operator_name=None, config=None, server=None)#

Represents an operator’s configuration.

You can use configurations to choose how an operator will run. This is an advanced feature for deep customization. The different options can change the way loops are done. They can also change whether the operator needs to perform checks on the input.

Parameters
  • operator_name (str, optional) – Name of the operator. The default is None.

  • config (str, optional) – Name of the configuration. The default is None.

  • server (str, optional) – Server with the channel connected to the remote or local instance. The default is None, in which case an attempt is made to use the global server.

property options#

Retrieve a list of configuration options and their values.

Returns

List of configuration options and their values.

Return type

list

set_config_option(config_name, config_value)#

Change the value of a configuration option.

Parameters

config_value (bool, int, float) –

Value to give to a configuration option. config_name : str

Name of the configuration option.

config_option_value(config_name)#

Retrieve the value for a configuration option.

Parameters

config_name (str) – Name of the configuration option.

Returns

Value for the configuration option.

Return type

str

config_option_documentation(config_name)#

Retrieve the documentation for a configuration option.

Parameters

config_name (str) – Name of the configuration option.

Returns

Documentation for the configuration option.

Return type

str

config_option_accepted_types(config_name)#

Retrieve accepted types for a configuration option.

Parameters

config_name (str) – Name of the configuration option.

Returns

One or more accepted types for the configuration option.

Return type

list, str

config_option_default_value(config_name)#

Retrieve the default value for a configuration option.

Parameters

config_name (str) – Name of the configuration option.

Returns

Default value for the configuration option.

Return type

str

property available_config_options#

Available configuration options for the operator.

Returns

One or more available configuration options for the operator.

Return type

list, str