ScriptRecipeDefinitionObject¶
- class ScriptRecipeDefinitionObject.ScriptRecipeDefinitionMarker¶
Bases:
object
Marker object to check whether a ScriptObject is a recipe definition object.
- Version added:
4.2.0.0
- property is_recipedefinition¶
Gets a value indicating whether this object is a recipe definition.
- Return type:
bool
- Returns:
True
if it is a recipe definition object; otherwise,False
- class ScriptRecipeDefinitionObject.ScriptRecipeDefinitionObject¶
Bases:
ScriptRecipeDefinitionMarker
ScriptObjects which are a recipe definition object are extended with this interface.
- Version added:
4.2.0.0
- property variables¶
Gets the variable list of the recipe definition.
- Return type:
- property recipes¶
Gets the recipe list of the recipe definition.
- Return type:
- class ScriptRecipeDefinitionObject.ScriptRecipeVariableList(iterable=(), /)¶
Bases:
list
This object represents the variable list of a recipe definition.
- Version added:
4.2.0.0
- add(variableName: str)¶
Adds a recipe variable with the given variable name to the recipe definition variable list.
- Parameters:
variableName (str) – The variable name to add to the recipe variable list.
- Raises:
ArgumentException – Thrown when the variable name is already existing.
- Return type:
- Returns:
The newly added ScriptRecipeVariable.
- insert_at(variableName: str, index: int)¶
Inserts a recipe variable at the given index with the given variable name to the recipe definition variable list.
- Parameters:
variableName (str) – The variable name to add to the recipe variable list.
index (int) – The index where the variable name should be inserted in the recipe variable list.
- Raises:
ArgumentException – Thrown when the variable name is already existing.
ArgumentOutOfRangeException – Thrown when the given index is not in the valid range.
- Return type:
- Returns:
The newly added ScriptRecipeVariable.
- remove(variableName: str)¶
Removes a recipe variable by the given variable name from the recipe definition variable list.
- Parameters:
variableName (str) – The variable name to remove
- Raises:
ArgumentNullException – Thrown when the variable name is not existing.
- remove_at(index: int)¶
Removes a recipe definition at the given index from the recipe definition variable list.
- Parameters:
index (int) – The index to remove
- Raises:
ArgumentOutOfRangeException – Thrown when the given index is not in the valid range.
- class ScriptRecipeDefinitionObject.ScriptRecipeVariable¶
Bases:
object
Represents a recipe variable within a recipe definition.
- Version added:
4.2.0.0
- property variablename¶
Gets the variable name of the recipe variable.
- Return type:
str
- property type¶
Gets the type of the recipe variable.
- Return type:
str
- property name¶
Gets/Sets the name of the recipe variable.
- Return type:
str
- property comment¶
Gets/Sets the comment of the recipe variable.
- Return type:
str
- property min_value¶
Gets/Sets the minimum value of the recipe variable.
- Return type:
str
- property max_value¶
Gets/Sets the maximum value of the recipe variable.
- Return type:
str
- class ScriptRecipeDefinitionObject.ScriptRecipeList(iterable=(), /)¶
Bases:
list
Represents the recipe list within a recipe definition.
- Version added:
4.2.0.0
- create(recipeName: str)¶
Creates a new recipe by the given name.
- Parameters:
recipeName (str) – The name of the recipe.
- Raises:
ArgumentException – Thrown when recipe name is already existing.
- Return type:
- Returns:
The newly created ScriptRecipe.
- remove(recipeName: str)¶
Removes a recipe by the given recipe name from the recipe list.
- Parameters:
recipeName (str) – The recipe name to remove
- Raises:
ArgumentOutOfRangeException – Thrown when recipe name is not existing.
- class ScriptRecipeDefinitionObject.ScriptRecipe¶
Bases:
object
Represents a recipe within a recipe definition.
- Version added:
4.2.0.0
- property recipename¶
Gets the name of the recipe.
- Return type:
str
- get_value(variableName: str)¶
Gets the value of the recipe to the given variable name.
- Parameters:
variableName (str) – The variable name
- Raises:
ArgumentNullException – Thrown when the variable name is not existing.
- Return type:
str
- set_value(variableName: str, value: str)¶
Sets the value of the recipe at the given variable name with the given value.
- Parameters:
variableName (str) – The variable name
value (str) – The value to set
- Raises:
ArgumentNullException – Thrown when the variable name is not existing.
- get_value_at(index: int)¶
Gets the value of the recipe to the given index.
- Parameters:
index (int) – The index
- Raises:
IndexOutOfRangeException – Thrown when the given index is not in the valid range.
- Return type:
str
- set_value_at(index: int, value: str)¶
Sets the value of the recipe at the given index with the given value.
- Parameters:
index (int) – The index where the value should be set
value (str) – The value to set
- Raises:
IndexOutOfRangeException – Thrown when the given index is not in the valid range.