Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
Faulty parameter issue in featurescript
darren_13
Member, Developers Posts: 119 PRO
I have a parameter that I select a plane:
And if there is no selection I want it highlighted in the GUI:
This works for the message but doesn't highlight the parameter? What am I doing wrong?
Thanks in advance,
Darren
annotation { "Name" : "Select Plane", "Filter" : EntityType.FACE, "MaxNumberOfPicks" : 1 } definition.selectPlane is Query;
And if there is no selection I want it highlighted in the GUI:
if (size(evaluateQuery(context, definition.selectPlane)) < 1) { throw regenError("Please select a plane", ["selectPlane"]); }
This works for the message but doesn't highlight the parameter? What am I doing wrong?
Thanks in advance,
Darren
0
Comments
https://cad.onshape.com/documents/95877be3b17f49277e87a2c3/w/b503830fd20472014beb1221/e/6a7730b786a3030938febbe7
under 'list exploration' folder, document 'Profile Generator (New)'
The dialog, however, doesn't show query list in red until the user has moved their selection to another query list. The idea here is, before you're done selecting, you haven't done anything wrong yet, so seeing red immediately is a bit jarring and might confuse someone who was otherwise going to select things correctly. If the user moves on without selecting a plane, then they'll see the parameter in red.
The feature as a whole errors out immediately, so they'll get a tooltip with your error message when hovering on the feature name (in either the feature list or the dialog), and they'll be prevented from committing a new feature until they fix the error.
Let me know if you have more questions!
Let's just say OS is very "polite" to the user. I've often missed inputs as the default empty "waiting for an input" field is a happy looking light blue with text in it that blends in to the surroundings.
By contrast the stuff I write is far more "shouty" to the user. I tell users that the aim is to make all the red boxes go away before hitting continue.
Perhaps there is a happy medium of say very light orange for "not wrong, but yet to be filled in fields"? Seems to fall into the accepted convention of red is error, orange is warning and green is good.
I think I saw an IR for left justifying default tip-text such as "select mate connector" and right justifying actual selections so I believe I'm not alone in this feeling.
Owen S
HWM-Water Ltd
Kind regards,
Darren