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.


Using a Part Studio Reference Parameter Breaks ErrorStringEnum Functionality

Alex_KempenAlex_Kempen Member Posts: 244 EDU
For a bit of background, ErrorStringEnums are the internal Onshape error messages which are utilized by every Onshape standard library feature in order to make translating and standardizing error messages easier. Although ErrorStringEnums are not currently exposed to users directly in the documentation, the three types of error reporting functions all have overloads which accept ErrorStringEnums, and they are occasionally relevant when importing Onshape features directly (like when using processNewBodyIfNeeded).

The issue I've been experiencing appears to be caused by the inclusion of a Part Studio reference parameter in my feature. In particular, it appears that making a part studio selection causes all ErrorStringEnum error reporting to become nonfunctional. This appears to affect all types of error reporting; processSubfeatureStatus won't propagate ErrorStringEnum error statuses correctly, and regenError, reportFeatureWarning, and reportFeatureInfo won't highlight faulty parameters or provide notifications containing messages when passed an ErrorStringEnum. However, this issue doesn't appear to affect custom messages, and it also appears to be a problem only while the feature is being edited.

While the feature is open and something from another Part studio is selected, throwing a regenError (and reporting a feature warning) with an ErrorStringEnum results in no regen error message:

However, closing the feature causes the regen error to be read properly:

You can find an example feature demonstrating this incorrect behavior here:
CS Student at UT Dallas
Check out my FeatureScripts here:

Sign In or Register to comment.