Sample Code Revit Batch Processor 1.1.11 documentation
Defines how to process warnings in Revit by storing the configuration for the failure handling.: - Rolling back on warnings - Printing warnings - Rolling back on errors - Printing errors - Setting forced modal handling ( refer to autodesk documentation for more information ) - Setting clear after rollback ( refer to autodesk documentation for more information )
An output function is also provided to allow for custom output handling.
An instance of this class is passed to the failure handling function to determine how to handle failures.
Bases: Base
Constructor for the FailureHandlingConfig class.
roll_back_on_warning (bool) – Roll back the transaction on warnings.
print_warnings (bool) – Print warnings.
roll_back_on_error (bool) – Roll back the transaction on errors.
print_errors (bool) – Print errors.
set_forced_modal_handling (bool) – Set forced modal handling. ( refer to autodesk documentation for more information )
set_clear_after_rollback (bool) – Set clear after rollback. ( refer to autodesk documentation for more information )
output_function (function) – A function to handle output.
kwargs – Additional keyword arguments.
Helps to pre process warnings in Revit.
Bases: IFailuresPreprocessor
Constructor for the FailuresPreprocessor class.
failure_processor (function) – The function to be used to process failures.
result (duHast.Utilities.Objects.result.Result) – The result of the operation.
fail_config (duHast.Revit.Common.Objects.FailureHandlingConfiguration.FailureHandlingConfig) – The failure handling configuration.
Parameter directives are used to modify parameters of elements in a Revit model. This class is the base class for all parameter directives.
Bases: Base
Base class for all parameter directives.
Constructor for the ParameterDirective class.
target_parameter_name (str) – The name of the parameter to be modified.
parameter_modifier (A function accepting the value as an argument and returning the modified value.) – The modifier to be applied to the parameter value.
parameter_value (any) – The value to be applied to the parameter.
j (json) – A json object containing the properties of the class.
kwargs (dict) – Additional keyword arguments.
ValueError – If the target_parameter_name or parameter_value is not supplied in j.
Convert the instance of this class to json. Ignores parameter modifier property
A Json object.
json
Parameter mappings are used to transfer parameter values from one parameter to another. This class is used to define
source parameter name
source parameter is instance
target parameter name
parameter value
parameter modifier ( of the parameter value retrieved from source parameter)
parameter getter ( a function that returns the value of the source parameter)
Bases: ParameterDirectiveBase
Class for parameter mapping directives.
Constructor for the ParameterMappingDirective class.
target_parameter_name (str) – The name of the parameter to be modified.
source_parameter_name (str) – The name of the parameter to be used as the source.
parameter_modifier (A function accepting the value as an argument and returning the modified value.) – The modifier to be applied to the parameter value.
parameter_value (any) – The value to be applied to the parameter.
source_parameter_is_instance (bool) – Indicates if the source parameter is an instance parameter.
parameter_getter (A function that returns the value of the source parameter.) – A function that returns the value of the source parameter.
j (json) – A json object containing the properties of the class.
kwargs (dict) – Additional keyword arguments.
ValueError – If the source_parameter_name or source_parameter_is_instance is not supplied in j.
Convert the instance of this class to json. Ignores parameter modifier and parameter getter class properties
A Json object.
json
Bases: object
Contains property names used in data set dictionary
Combines the set and option name is fixed format
set_name (str) – The option set name
option_name (str) – The option name
Combination of set and option name
str