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.

Use FeatureScript to automatically hide itself

Lee_HeskethLee_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
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!

Best Answer

Answers

  • Lee_HeskethLee_Hesketh Member, Developers Posts: 148 ✭✭
    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!
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,173
    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 Inc
  • Lee_HeskethLee_Hesketh Member, Developers Posts: 148 ✭✭
    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!
  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    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.

Sign In or Register to comment.