BaseSource
#
- class ansys.speos.core.source.BaseSource(project, name, description='', metadata=None, source_instance=None)#
Super Class for all sources.
- Parameters:
- project
ansys.speos.core.project.Project
Project in which source shall be created.
- name
str
Name of the source.
- description
str
Description of the source. By default,
""
.- metadata
Optional
[Mapping
[str
,str
]] Metadata of the feature. By default,
{}
.- source_instance
ansys.api.speos.scene.v2.scene_pb2.Scene.SourceInstance
,optional
Source instance to provide if the feature does not have to be created from scratch By default,
None
, means that the feature is created from scratch by default.
- project
- Parameters:
Notes
This is a Super class, Do not instantiate this class yourself
Overview#
Link object for the source template in database. |
Return the string representation of the source. |
Import detail#
from ansys.speos.core.source import BaseSource
Attribute detail#
- BaseSource.source_template_link = None#
Link object for the source template in database.
Method detail#
- BaseSource.get(key='')#
Get dictionary corresponding to the project - read only.
- BaseSource.__str__()#
Return the string representation of the source.
- BaseSource.commit()#
Save feature: send the local data to the speos server database.
- Returns:
ansys.speos.core.source.BaseSource
Source feature.
- BaseSource.reset()#
Reset feature: override local data by the one from the speos server database.
- Returns:
ansys.speos.core.source.BaseSource
Source feature.
- BaseSource.delete()#
Delete feature: delete data from the speos server database.
The local data are still available
- Returns:
ansys.speos.core.source.BaseSource
Source feature.