Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Options

regenError message not displayed in dialog tooltip

brett_suttonbrett_sutton Member Posts: 42 ✭✭✭
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

Sign In or Register to comment.