regenError message not displayed in dialog tooltip

brett_sutton
brett_sutton Member Posts: 43 ✭✭✭
edited January 2017 in FeatureScript
I'm trying to modify the auto layout tool to improve the error messages and a few other issues.

I'm trying to use regenError to display a useful message in the auto tools dialog box. (e.g. when the title goes red you can hover to see the error details).

My reading of the documentation suggest that the error passed to regenError should be displayed as the tooltip, but no such luck.

I've tried a couple possible variants;

the original

          // throw regenError(ErrorStringEnum.TRANSFORM_FAILED, ["cutSheet"]);
              
// variant one
               throw regenError("Not enough doodads to create widget. Please select more doodads.", ["cutSheet"]);
// variant two
                //throw "Cut sheet is smaller than largest part plus twice the spacing,";   

// variant three
throw regenError("Not enough doodads to create widget. Please select more doodads.");

Variant three makes the most sense.
In each case  the error message is not displayed anywhere, which isn't really useful.

What am I doing wrong?

Here is a version of the script:
https://cad.onshape.com/documents/58809db1cb421510b0d6d758/v/3da0629ac699ec4f63aab012


Best Answer

Answers