IEntityWriter#

class ansys.bdm.api.ientity_writer.IEntityWriter#

Bases: Protocol

An object used to create a new entity from a stream of data.

Instances are created from IStorageScope.begin_store()

Overview#

stream

Return object that can be written to, which will be stored as the entity.

handle

Return the entity created by this object.

__enter__

Start writing data that will comprise an entity.

__exit__

Finish collecting data and store entity.

Import detail#

from ansys.bdm.api.ientity_writer import IEntityWriter

Property detail#

property IEntityWriter.stream: io.RawIOBase#

Return object that can be written to, which will be stored as the entity.

This method will throw an exception if __enter__ has not been called.

This method will throw an exception if __exit__ has been called.

property IEntityWriter.handle: ansys.bdm.api.entity_handle.EntityHandle#

Return the entity created by this object.

This method will throw an exception if __exit__ has not been called.

Method detail#

IEntityWriter.__enter__() → IEntityWriter#

Start writing data that will comprise an entity.

IEntityWriter.__exit__(__exc_type: type[BaseException] | None, __exc_value: BaseException | None, __traceback: types.TracebackType | None) → None#

Finish collecting data and store entity.

This method will throw an exception if __enter__ has not been called.