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.
update input-field by Editing Logic Function
In the feature script, a parameter 'myCount' is limited less than or equal to another parameter 'maxOfMyCount' by Editing Logic Function.
https://cad.onshape.com/documents/bbe6f3ebb09eeeb200d9910f/v/9b806f66e23d3aee383b311e/e/c668a5d31e04466e5c8ebe6b?renderMode=0&uiState=676647ee9e78ce632fb5fa42
When I change 'myCount' to be greater than 'maxOfMyCount' in the edit dialog, the input-field of 'myCount' is not updated by the Editing Logic Function. After then the field is locked to be unable to be changed by mouse-scroll-wheel. It keeps locked even after 'maxOfMyCount' is changed to bigger.
After closing edit dialog for save and re-open the edit dialog, the field of 'myCount' is updated to the real value.
I think this is a problem of UI while Editing Logic Function correctly updates the real value inside.
Important points are:
- The real value is different from one displayed in the field of edit dialog.
- Users may be confused by lock of mouse-scroll-wheel.
This problem may be related by
https://forum.onshape.com/discussion/18685/featurescript-editing-logic-function-does-not-update-length-parameter-in-feature-ui
But this linked document is now not public, so I cannot see it.
Comments
Just a thought, but is your first if block even necessary? If you comment block that out does it give you the behavior you are expecting? You might also need to change the second if comparison to >= depending on whether you want the boolean to stay true, even after you continue increasing myCount.
Hi, GregBrown
I had assumed it is better that the value in the field does not exceed 'maxOfMyCount'.
https://cad.onshape.com/documents/bbe6f3ebb09eeeb200d9910f/v/cb6a04b8f55de69976d83910/e/c668a5d31e04466e5c8ebe6b
I comment out the 'first if' and delete 'USHint.READ_ONLY' of isMax.
Changing 'isMax' makes 'myCount' to be minimum or maximum.
I delete 'copyOfMyCount' which is only for debugging.
It has pretty good UI.
I am making the following document.
https://cad.onshape.com/documents/590a7cf1427f8819c664efa0/w/48157f2db1e47c701adfeaa1/e/ae3173afd663a8bbce1a1fa6
Parameter 'Current step number' is limited by max 'number of steps'.
Thank you