PdmObjectBase

class rips.PdmObjectBase(pb2_object: PdmObject | None, channel: Channel | None)

Bases: object

The ResInsight base class for the Project Data Model

Attributes Summary

D

O

Value

alias of Union[bool, str, float, int, ValueArray]

ValueArray

alias of List[Union[bool, str, float, int, ValueArray]]

X

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(obj)

Copy attribute values from object to self

delete()

Delete object in ResInsight

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

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

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()

Attributes Documentation

D = ~D
O = ~O
Value

alias of Union[bool, str, float, int, ValueArray]

alias of Union[bool, str, float, int, ValueArray] .. autoattribute:: Value .. autoattribute:: ValueArray .. autoattribute:: X

Methods Documentation

add_new_object(class_definition: Type[D], child_field: str = '') D | None

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() Any

Get the unique address of the PdmObject

Returns:

A 64-bit unsigned integer address

ancestor(class_definition: Type[D]) D | None

Find the first ancestor that matches the provided class_keyword :param class_definition[class]: A class definition matching the type of class wanted

channel() Channel

Private method

children(child_field: str, class_definition: Type[D]) List[D]

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(obj: object) None

Copy attribute values from object to self

delete() None

Delete object in ResInsight

descendants(class_definition: Type[D]) List[D]

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() bool
pb2_object() PdmObject

Private method

print_object_info() None

Print the structure and data content of the PdmObject

set_value(snake_keyword: str, value: object) None

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: bool) None

Set the visibility of the object in the ResInsight project tree

update() None

Sync all fields from the Python Object to ResInsight

visible() bool

Get the visibility of the object in the ResInsight project tree

warnings() List[str]