Zero touch node - how to make error visible?

Hi guys,

I’m looking for some inspiration on how to make errors well visible in my ZT nodes.

See the example below. I can definitely set an error message (such as in the example below: “A node load was applied in loadcase 1 on a Dynamo point that does not exist in RFEM as a node, make sure the node is sent to RFEM as geometry”)

But it is not really well visible for a user.

Does anyone have suggestions on how to make the error more visible? Perhaps I can set an node error state (orange? red?) but I have not yet found code to do so. Does anyone know how to do that?

Thanks! :grinning:

image

Throw an exception:

    /// <summary>
    /// Thrown if the <see cref="Revit.Sheet.Duplicate"/> option input by the user is invalid.
    /// </summary>
    internal static void ValidateDuplicateOption(int duplicateOption)
    {
        //#Validate the duplicate option
        if (duplicateOption < 0 | duplicateOption > 2)
        {
            throw new InvalidOperationException("Sheet.Duplicate operation failed.\nInvalid duplicateOption input. Input an integer within the range 0-2");
        }
    }
3 Likes

That’s an excellent solution!

Thanks Thomas!

Used:
throw new InvalidOperationException(ErrorMessage);

image

1 Like