GenericDataContainer
#
- class ansys.dpf.core.generic_data_container.GenericDataContainer(generic_data_container=None, server=None)#
Maps properties to their DPF supported Data Types.
- Parameters:
generic_data_container (ctypes.c_void_p, ansys.grpc.dpf.generic_data_container_pb2.GenericDataContainer message, optional # noqa: E501)
server (DPFServer, optional) – Server with channel connected to the remote or local instance. The default is
None
, in which case an attempt is made to use the global server.
Notes
Class available with server’s version starting at 7.0 (Ansys 2024 R1 pre0).
Overview#
Register given property with the given name. |
|
Get property with given name. |
|
Get a dictionary description of properties by name and data type. |
Import detail#
from ansys.dpf.core.generic_data_container import GenericDataContainer
Method detail#
- GenericDataContainer.__str__()#
Describe the entity.
- Returns:
description – Description of the entity.
- Return type:
str
- GenericDataContainer.set_property(property_name: str, prop: int | float | str | ansys.dpf.core.Field | ansys.dpf.core.StringField | ansys.dpf.core.GenericDataContainer | ansys.dpf.core.Scoping)#
Register given property with the given name.
- Parameters:
property_name – Property name.
prop – Property object.
- GenericDataContainer.get_property(property_name, output_type: None | type | ansys.dpf.core.types = None)#
Get property with given name.
- Parameters:
property_name (str) – Property name.
output_type (None, type, types, optional) – Expected type of the output. By default, type is deduced using GenericDataContainer.get_property_description.
- Return type:
Property object instance.
- GenericDataContainer.get_property_description()#
Get a dictionary description of properties by name and data type.
- Returns:
description – Description of the GenericDataContainer’s contents
- Return type:
dict
- GenericDataContainer.__del__()#
Delete the current instance.