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.
editing logic + UIHint REMEMBER_PREVIOUS_VALUE
imants_smidchens
Member Posts: 63 EDU
I'd like to write a color picker&placer featurescript that works across documents - potentially expanding to more than just color later - using the remember previous value UIHint, but it appears as though the definition returned by editing logic cannot be remembered.
At first I thought it might be the parameter type causing issues, but this persists across various parameter types, including ones that can definitely be remembered normally.
I could just have it get the color and make users copy it to their clipboard, then assign it manually, but where's the fun in that?
At first I thought it might be the parameter type causing issues, but this persists across various parameter types, including ones that can definitely be remembered normally.
I could just have it get the color and make users copy it to their clipboard, then assign it manually, but where's the fun in that?
0
Answers
For your use case, you may find it easier to provide tooling for both defining and then using a variable containing an arbitrary color; this would allow users to store the variables in a manner of their choosing (e.g. variable studios) and use them freely. That being said, that workflow may still be worse than simply saving and using custom colors directly via the built in color picker widget.
I think you might be right - better to just use the default color picker widget (though I had hoped to expand this to be applicable to more than just colors)