@@ -34,6 +34,25 @@ class Config:
3434 Server with the channel connected to the remote or local instance. The default is
3535 ``None``, in which case an attempt is made to use the global server.
3636
37+ Examples
38+ --------
39+ Create an operator configuration, instantiate the operator and
40+ run it with the configuration.
41+
42+ >>> from ansys.dpf import core as dpf
43+ >>> config_add = dpf.Config("add")
44+ >>> config_add.set_work_by_index_option(True)
45+ >>> op = dpf.operators.math.add(config=config_add)
46+
47+ Modify the copy of an operator's configuration and set it as current config
48+ of the operator.
49+
50+ >>> from ansys.dpf import core as dpf
51+ >>> op = dpf.operators.math.add()
52+ >>> config_add = op.config
53+ >>> config_add.set_work_by_index_option(True)
54+ >>> op.config = config_add
55+
3756 """
3857
3958 def __init__ (self , operator_name = None , config = None , server = None , spec = None ):
@@ -144,6 +163,18 @@ def set_config_option(self, config_name, config_value):
144163 Value to give to a configuration option.
145164 config_name : str
146165 Name of the configuration option.
166+
167+ Examples
168+ --------
169+ Modify the copy of an operator's configuration and set it as current config
170+ of the operator.
171+
172+ >>> from ansys.dpf import core as dpf
173+ >>> op = dpf.operators.math.add()
174+ >>> config_add = op.config
175+ >>> config_add.set_config_option(config_name="work_by_index", config_value=True)
176+ >>> op.config = config_add
177+
147178 """
148179 return self .__set_config_option__ (config_value , config_name )
149180
0 commit comments