def valueReadPreprocessor(valueString, replaceParamsFile=None):
    """
    Apply global pre-processing to values during reading throughout the project.

    Args:
        valueString (str): String representing the value to be preprocessed.
        replaceParamsFile (gsshapy.orm.ReplaceParamFile, optional): Instance of the replace param file. Required if
            replacement variables are included in the project.

    Returns:
        str: Processed value as a string
    """
    if type(valueString) is bool:
        log.warning("Only numerical variable types can be handled by the valueReadPreprocessor function.")
        return valueString

    # Default
    processedValue = valueString

    # Check for replacement variables
    if replaceParamsFile is not None and valueString is not None:
        if '[' in valueString or ']' in valueString:
            # Set default value
            processedValue = '{0}'.format(REPLACE_NO_VALUE)

            # Find the matching parameter and return the negative of the id
            for targetParam in replaceParamsFile.targetParameters:
                if targetParam.targetVariable == valueString:
                    processedValue = '{0}'.format(-1 * targetParam.id)
                    break

    return processedValue
Apply global pre-processing to values during reading throughout the project.

    Args:
        valueString (str): String representing the value to be preprocessed.
        replaceParamsFile (gsshapy.orm.ReplaceParamFile, optional): Instance of the replace param file. Required if
            replacement variables are included in the project.

    Returns:
        str: Processed value as a string