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.
Use FeatureScript to automatically hide itself
Lee_Hesketh
Member, Developers Posts: 148 ✭✭✭
Hello all, how could I set my script up such that when executed, it is hidden in the feature tree? Is it simply using the UIHint ALWAYS_HIDDEN in the feature name annotation at the top?
Thanks
Lee Hesketh
Thanks
Lee Hesketh
There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!
Tagged:
0
Best Answer
-
I don't think there's a way to do what you want.
Onshape and FeatureScript like to discourage hidden state. So, if you create something, there needs to be a way to modify it and delete it. For features, this means anything that executes is always there in your feature tree, where you can modify its inputs, rollback before it, delete it, etc.
What problem are you trying to solve with a hidden feature?
5
Answers
-
I don't think there's a way to do what you want.
Onshape and FeatureScript like to discourage hidden state. So, if you create something, there needs to be a way to modify it and delete it. For features, this means anything that executes is always there in your feature tree, where you can modify its inputs, rollback before it, delete it, etc.
What problem are you trying to solve with a hidden feature?
5 -
Ah, I sense I have mislead you. By hidden, I meant the equivalent of clicking the eye symbol in the feature list. My script works with mate connectors, which are visible after the script executes. Clicking the eye hides them from view. I wanted my script to do that, so the mate connectors are not visible.There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!0
-
Do you need the mate connectors outside the feature? In other words, can you not just use opDeleteBodies to get rid of them at the end of your feature?Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0
-
I still need them afterwards. If this is not possible, I can just hide the feature using the eye symbol manually. I was wondering if FS could do this automatically.There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!0
-
Aha, that makes much more sense.
Yes, I could imagine us adding a feature UI hint like HIDE_ON_CREATION. An improvement request would be the best way for something like this to gain traction.
3


