1717
1818
1919class customtypefield_get_attribute (Operator ):
20- r"""A CustomTypeField in pin 0 and a property name (string) in pin 1 are
21- expected in input.
20+ r"""Gets a property from an input field/field container. A CustomTypeFieldin
21+ pin 0, a property name (string) in pin 1 are expected as inputs
2222
2323
2424 Parameters
2525 ----------
26- custom_type_field: CustomTypeField
26+ custom_type_field: CustomTypeField or CustomTypeFieldsContainer
2727 property_name: str
28- Accepted inputs are: 'time_freq_support', 'scoping' and 'header'.
28+ Property to get. Accepted inputs are specific strings namely: 'unit, 'name', 'time_freq_support', 'scoping' and 'header'.
2929
3030 Returns
3131 -------
32- property: TimeFreqSupport or Scoping or DataTree
33- Property value.
32+ property_value: str or TimeFreqSupport or Scoping or DataTree
33+ Property value that is returned. Accepted Outputs are: Field, PropertyField, StringField, CustomTypeField or their containers .
3434
3535 Examples
3636 --------
@@ -52,7 +52,7 @@ class customtypefield_get_attribute(Operator):
5252 ... )
5353
5454 >>> # Get output data
55- >>> result_property = op.outputs.property ()
55+ >>> result_property_value = op.outputs.property_value ()
5656 """
5757
5858 def __init__ (
@@ -70,31 +70,36 @@ def __init__(
7070
7171 @staticmethod
7272 def _spec () -> Specification :
73- description = r"""A CustomTypeField in pin 0 and a property name (string) in pin 1 are
74- expected in input.
73+ description = r"""Gets a property from an input field/field container. A CustomTypeFieldin
74+ pin 0, a property name (string) in pin 1 are expected as inputs
7575"""
7676 spec = Specification (
7777 description = description ,
7878 map_input_pin_spec = {
7979 0 : PinSpecification (
8080 name = "custom_type_field" ,
81- type_names = ["custom_type_field" ],
81+ type_names = ["custom_type_field" , "custom_type_fields_container" ],
8282 optional = False ,
8383 document = r"""""" ,
8484 ),
8585 1 : PinSpecification (
8686 name = "property_name" ,
8787 type_names = ["string" ],
8888 optional = False ,
89- document = r"""Accepted inputs are: 'time_freq_support', 'scoping' and 'header'.""" ,
89+ document = r"""Property to get. Accepted inputs are specific strings namely: 'unit, 'name', 'time_freq_support', 'scoping' and 'header'.""" ,
9090 ),
9191 },
9292 map_output_pin_spec = {
9393 0 : PinSpecification (
94- name = "property" ,
95- type_names = ["time_freq_support" , "scoping" , "abstract_data_tree" ],
94+ name = "property_value" ,
95+ type_names = [
96+ "string" ,
97+ "time_freq_support" ,
98+ "scoping" ,
99+ "abstract_data_tree" ,
100+ ],
96101 optional = False ,
97- document = r"""Property value.""" ,
102+ document = r"""Property value that is returned. Accepted Outputs are: Field, PropertyField, StringField, CustomTypeField or their containers .""" ,
98103 ),
99104 },
100105 )
@@ -194,7 +199,7 @@ def custom_type_field(self) -> Input:
194199 def property_name (self ) -> Input :
195200 r"""Allows to connect property_name input to the operator.
196201
197- Accepted inputs are: 'time_freq_support', 'scoping' and 'header'.
202+ Property to get. Accepted inputs are specific strings namely: 'unit, 'name', 'time_freq_support', 'scoping' and 'header'.
198203
199204 Returns
200205 -------
@@ -221,32 +226,40 @@ class OutputsCustomtypefieldGetAttribute(_Outputs):
221226 >>> from ansys.dpf import core as dpf
222227 >>> op = dpf.operators.utility.customtypefield_get_attribute()
223228 >>> # Connect inputs : op.inputs. ...
224- >>> result_property = op.outputs.property ()
229+ >>> result_property_value = op.outputs.property_value ()
225230 """
226231
227232 def __init__ (self , op : Operator ):
228233 super ().__init__ (customtypefield_get_attribute ._spec ().outputs , op )
229- self .property_as_time_freq_support = Output (
234+ self .property_value_as_string = Output (
235+ _modify_output_spec_with_one_type (
236+ customtypefield_get_attribute ._spec ().output_pin (0 ), "string"
237+ ),
238+ 0 ,
239+ op ,
240+ )
241+ self ._outputs .append (self .property_value_as_string )
242+ self .property_value_as_time_freq_support = Output (
230243 _modify_output_spec_with_one_type (
231244 customtypefield_get_attribute ._spec ().output_pin (0 ), "time_freq_support"
232245 ),
233246 0 ,
234247 op ,
235248 )
236- self ._outputs .append (self .property_as_time_freq_support )
237- self .property_as_scoping = Output (
249+ self ._outputs .append (self .property_value_as_time_freq_support )
250+ self .property_value_as_scoping = Output (
238251 _modify_output_spec_with_one_type (
239252 customtypefield_get_attribute ._spec ().output_pin (0 ), "scoping"
240253 ),
241254 0 ,
242255 op ,
243256 )
244- self ._outputs .append (self .property_as_scoping )
245- self .property_as_data_tree = Output (
257+ self ._outputs .append (self .property_value_as_scoping )
258+ self .property_value_as_data_tree = Output (
246259 _modify_output_spec_with_one_type (
247260 customtypefield_get_attribute ._spec ().output_pin (0 ), "data_tree"
248261 ),
249262 0 ,
250263 op ,
251264 )
252- self ._outputs .append (self .property_as_data_tree )
265+ self ._outputs .append (self .property_value_as_data_tree )
0 commit comments