@@ -18,6 +18,8 @@ class pres_to_field(Operator):
1818 ----------
1919 filepath : str
2020 Filepath
21+ columns_to_read : int, optional
22+ Columns_to_read
2123
2224
2325 Examples
@@ -30,22 +32,27 @@ class pres_to_field(Operator):
3032 >>> # Make input connections
3133 >>> my_filepath = str()
3234 >>> op.inputs.filepath.connect(my_filepath)
35+ >>> my_columns_to_read = int()
36+ >>> op.inputs.columns_to_read.connect(my_columns_to_read)
3337
3438 >>> # Instantiate operator and connect inputs in one line
3539 >>> op = dpf.operators.result.pres_to_field(
3640 ... filepath=my_filepath,
41+ ... columns_to_read=my_columns_to_read,
3742 ... )
3843
3944 >>> # Get output data
4045 >>> result_field = op.outputs.field()
4146 """
4247
43- def __init__ (self , filepath = None , config = None , server = None ):
48+ def __init__ (self , filepath = None , columns_to_read = None , config = None , server = None ):
4449 super ().__init__ (name = "PRES_Reader" , config = config , server = server )
4550 self ._inputs = InputsPresToField (self )
4651 self ._outputs = OutputsPresToField (self )
4752 if filepath is not None :
4853 self .inputs .filepath .connect (filepath )
54+ if columns_to_read is not None :
55+ self .inputs .columns_to_read .connect (columns_to_read )
4956
5057 @staticmethod
5158 def _spec ():
@@ -59,6 +66,12 @@ def _spec():
5966 optional = False ,
6067 document = """Filepath""" ,
6168 ),
69+ 1 : PinSpecification (
70+ name = "columns_to_read" ,
71+ type_names = ["int32" ],
72+ optional = True ,
73+ document = """Columns_to_read""" ,
74+ ),
6275 },
6376 map_output_pin_spec = {
6477 0 : PinSpecification (
@@ -118,12 +131,16 @@ class InputsPresToField(_Inputs):
118131 >>> op = dpf.operators.result.pres_to_field()
119132 >>> my_filepath = str()
120133 >>> op.inputs.filepath.connect(my_filepath)
134+ >>> my_columns_to_read = int()
135+ >>> op.inputs.columns_to_read.connect(my_columns_to_read)
121136 """
122137
123138 def __init__ (self , op : Operator ):
124139 super ().__init__ (pres_to_field ._spec ().inputs , op )
125140 self ._filepath = Input (pres_to_field ._spec ().input_pin (0 ), 0 , op , - 1 )
126141 self ._inputs .append (self ._filepath )
142+ self ._columns_to_read = Input (pres_to_field ._spec ().input_pin (1 ), 1 , op , - 1 )
143+ self ._inputs .append (self ._columns_to_read )
127144
128145 @property
129146 def filepath (self ):
@@ -145,6 +162,26 @@ def filepath(self):
145162 """
146163 return self ._filepath
147164
165+ @property
166+ def columns_to_read (self ):
167+ """Allows to connect columns_to_read input to the operator.
168+
169+ Columns_to_read
170+
171+ Parameters
172+ ----------
173+ my_columns_to_read : int
174+
175+ Examples
176+ --------
177+ >>> from ansys.dpf import core as dpf
178+ >>> op = dpf.operators.result.pres_to_field()
179+ >>> op.inputs.columns_to_read.connect(my_columns_to_read)
180+ >>> # or
181+ >>> op.inputs.columns_to_read(my_columns_to_read)
182+ """
183+ return self ._columns_to_read
184+
148185
149186class OutputsPresToField (_Outputs ):
150187 """Intermediate class used to get outputs from
0 commit comments