ansys.dpf.core.GenericDataContainer#
- class ansys.dpf.core.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).
- _server#
- _api_instance = None#
- _prop_description_instance = None#
- property _api#
- __str__()#
Describe the entity.
- Returns:
description – Description of the entity.
- Return type:
str
- 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.
- 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.
- 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
- __del__()#
Delete the current instance.