:class:`RACustomCurveAndGridProperty` ===================================== .. py:class:: ansys.rocky.app.ra_custom_calculators.RACustomCurveAndGridProperty Helper class, to add, edit and remove custom curves and grid properties. .. code-block:: python particles = study.GetParticles() particles.AddCustomCurve(name='Custom Curve', scope='user', sources={'A': 'Particles Mass', 'B': 'Particles In Count'}) particles.EditCustomCurve(edit_curve='Custom Curve', expression='A+B') particles.RemoveCustomCurve(name='Custom Curve') particles.AddCustomProperty(name='Property A', sources={'A': 'Coordinate : X', 'B': 'Coordinate : Y'}) particles.EditCustomProperty(edit_property='Property A', new_name='New Property', expression='A*B') particles.RemoveCustomProperty(name='New Property') .. !! processed by numpydoc !! .. py:currentmodule:: RACustomCurveAndGridProperty Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~AddCustomCurve` - Add a custom curve in the database. * - :py:attr:`~EditCustomCurve` - Edit a custom curve saved in the database. * - :py:attr:`~RemoveCustomCurve` - Remove the curve from the database * - :py:attr:`~AddCustomProperty` - Add a custom property to the database * - :py:attr:`~EditCustomProperty` - Edit a custom property saved in the database. * - :py:attr:`~RemoveCustomProperty` - Remove the property from the database Import detail ------------- .. code-block:: python from ansys.rocky.app.ra_custom_calculators import RACustomCurveAndGridProperty Method detail ------------- .. py:method:: AddCustomCurve(name: str, curve_type: str = ..., output_unit: str = ..., scope: str = ..., sources: dict[str, str] | None = None, expression: str = '') -> None Add a custom curve in the database. :param name: The name of the curve to be set. :param curve_type: The type of the custom curve to be added. :param output_unit: The output unit, in which case the unit database will be queried for a quantity that makes sense. If None, the quantity is considered unknown. :param scope: The scope to be set. :param sources: A dict pointing the variable used to the curve association it represents and a string indicating in which unit the input data should be gotten. :param expression: The expression to be set. .. !! processed by numpydoc !! .. py:method:: EditCustomCurve(edit_curve: str, new_name: str | None = None, sources: dict[str, str] | None = None, expression: str | None = None) -> None Edit a custom curve saved in the database. :param edit_curve: The name of the curve to be edited. :param new_name: The new name of the curve to be set. :param sources: A dict pointing the variable used to the curve association it represents and a string indicating in which unit the input data should be gotten. :param expression: The expression to be set. .. !! processed by numpydoc !! .. py:method:: RemoveCustomCurve(name: str) -> None Remove the curve from the database :param name: The name of the curve to be removed. .. !! processed by numpydoc !! .. py:method:: AddCustomProperty(name: str, property_type: str = ..., output_unit: str = ..., scope: str = ..., sources: dict[str, str] | None = None, expression: str = '') -> None Add a custom property to the database :param name: The name of the property to be set. :param property_type: The type of the custom property to be added. :param output_unit: The output unit, in which case the unit database will be queried for a quantity that makes sense. If None, the quantity is considered unknown. :param scope: The scope to be set. :param sources: A dict pointing the variable used to the property association it represents and a string indicating in which unit the input data should be gotten. :param expression: The expression to be set. .. !! processed by numpydoc !! .. py:method:: EditCustomProperty(edit_property: str, new_name: str | None = None, sources: dict[str, str] | None = None, expression: str | None = None) -> None Edit a custom property saved in the database. :param edit_property: The name of the property to be edited. :param new_name: The new name of the property to be set. :param sources: A dict pointing the variable used to the property association it represents and a string indicating in which unit the input data should be gotten. :param expression: The expression to be set. .. !! processed by numpydoc !! .. py:method:: RemoveCustomProperty(name: str) -> None Remove the property from the database :param name: The name of the property to be removed. .. !! processed by numpydoc !!