PdmObjectBase¶
- class rips.PdmObjectBase(pb2_object, channel)¶
Bases:
object
The ResInsight base class for the Project Data Model
Methods Summary
add_new_object
(class_definition[, child_field])Create and add an object to the specified child field :param class_definition[class]: Class definition of the object to create :param child_field[str]: The keyword for the field to create a new object in.
address
()Get the unique address of the PdmObject
ancestor
(class_definition)Find the first ancestor that matches the provided class_keyword :param class_definition[class]: A class definition matching the type of class wanted
channel
()Private method
children
(child_field, class_definition)Get a list of all direct project tree children inside the provided child_field :param child_field[str]: A field name
copy_from
(object)Copy attribute values from object to self
descendants
(class_definition)Get a list of all project tree descendants matching the class keyword :param class_definition[class]: A class definition matching the type of class wanted
Private method
Print the structure and data content of the PdmObject
set_value
(snake_keyword, value)Set the value associated with the provided keyword and updates ResInsight
set_visible
(visible)Set the visibility of the object in the ResInsight project tree
update
()Sync all fields from the Python Object to ResInsight
visible
()Get the visibility of the object in the ResInsight project tree
warnings
()Methods Documentation
- add_new_object(class_definition, child_field='')¶
Create and add an object to the specified child field :param class_definition[class]: Class definition of the object to create :param child_field[str]: The keyword for the field to create a new object in. If empty, the first child array field is used.
- Returns
The created PdmObject inside the child_field
- address()¶
Get the unique address of the PdmObject
- Returns
A 64-bit unsigned integer address
- ancestor(class_definition)¶
Find the first ancestor that matches the provided class_keyword :param class_definition[class]: A class definition matching the type of class wanted
- channel()¶
Private method
- children(child_field, class_definition)¶
Get a list of all direct project tree children inside the provided child_field :param child_field[str]: A field name
- Returns
A list of PdmObjects inside the child_field
- copy_from(object)¶
Copy attribute values from object to self
- descendants(class_definition)¶
Get a list of all project tree descendants matching the class keyword :param class_definition[class]: A class definition matching the type of class wanted
- Returns
A list of PdmObjects matching the class_definition
- has_warnings()¶
- pb2_object()¶
Private method
- print_object_info()¶
Print the structure and data content of the PdmObject
- set_value(snake_keyword, value)¶
Set the value associated with the provided keyword and updates ResInsight
- Parameters
keyword (str) -- A string containing the parameter keyword
value (varying) -- A value matching the type of the parameter. See keyword documentation and/or print_object_info() to find the correct data type.
- set_visible(visible)¶
Set the visibility of the object in the ResInsight project tree
- update()¶
Sync all fields from the Python Object to ResInsight
- visible()¶
Get the visibility of the object in the ResInsight project tree
- warnings()¶