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.

Conditional UI in Configurable Parts

marcus_bernsteinmarcus_bernstein Member, User Group Leader Posts: 35 EDU
Is it possible to create a conditional UI in a configurable part similar to conditional formatting in a Featurescript? Making a pretty complex addition to the MKCAD parts library for FIRST Robotics, and I am hoping to turn off some of the customization features for new users.
Any chance Onshape is looking for interns?

Philadelphia User Group Leader
Tagged:

Comments

  • marcus_bernsteinmarcus_bernstein Member, User Group Leader Posts: 35 EDU
    Also, is is possible to set defaults in a dropdown dependent on previous dropdown selections? Say dropdowns one and two allow me to select a profile - can I set dropdown two's default to be whatever the user has set for dropdown 1 earlier in the UI?
    Any chance Onshape is looking for interns?

    Philadelphia User Group Leader
  • mahirmahir Member, Developers Posts: 1,303 ✭✭✭✭✭
    I don't believe this is possible directly. However, if you create a configurable part with all the options enabled, then that part can be instantiated via a featurescript that exposes only the desired configurations.
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,930 PRO
    Oh, you create a custom feature that just derives a part, then setup  logical preconditions.. That's pretty friken clever @mahir
  • mahirmahir Member, Developers Posts: 1,303 ✭✭✭✭✭
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,930 PRO
    sweet, thanks for the link, I'm gonna need that script example later :smile:
  • marcus_bernsteinmarcus_bernstein Member, User Group Leader Posts: 35 EDU
    This looks awesome! Unfortunately, the solution is far beyond my paygrade or Featurescript knowledge. @mahir @ilya_baran, looking at a configurable part like the "Shaft" part studio in this document, how would I go about implementing this solution? Thanks
    Any chance Onshape is looking for interns?

    Philadelphia User Group Leader
  • mahirmahir Member, Developers Posts: 1,303 ✭✭✭✭✭
    I'm not very familiar with the specific code commands/syntax required, but here's the gist.
    1. The Shaft part studio becomes your template for configuration instantiation.
    2. Turn all the variables you plan on having control over into configured inputs. In your example that would probably be all the variables declared at the top of the feature tree.
    3. The configured inputs can now be accessed by a custom featurescript (probably in the same document) that exposes some subset of all the configured inputs based on the options selected.
    4. Add this new featurescript to your toolbar.
    5. Use the featurescript in any part studio to insert a derived body based on the your template part studio and its configured inputs.
  • marcus_bernsteinmarcus_bernstein Member, User Group Leader Posts: 35 EDU
    I've made a simple test following this workflow, and while I'm able to accomplish "conditional UI" as intended in the part studio/FS, inserting the new configurable part gives a UI with all options available, regardless of the conditional UI in the featurescript. I'm realizing now that it might not be clear what I'm trying to accomplish. 

    I'm hoping, with this broader project, to create a configurable part that I can drop into an assembly using parameters the user gives - no derives into unique part studios on the user's end. Currently, when inserting the shaft to be configurable, there is an overwhelming number of configurations for simpler users, but it still doesn't have quite the customization that superusers are looking for. I'm hoping to create a conditional UI that opens or removes some of the customization features dependent on checkboxes in the configurable UI. Looking deep into the Ilya's thread, I'm not sure this workflow accomplishes what I'm going for, though it's likely I'm missing something.
    Any chance Onshape is looking for interns?

    Philadelphia User Group Leader
  • mahirmahir Member, Developers Posts: 1,303 ✭✭✭✭✭
    edited May 2020
    As I said in my first post, this is not possible. A configured input is either visible or it's not. The only workaround will require a custom featurescript and a separate part studio to insert it into. Alternatively, you can create multiple configured versions of the part. One that has all the bells and whistles, and another that eliminates some of the options. But conditional configuration UI is not currently a feature. Feel free to vote for this improvement or this other one
  • EvanAReeseEvanAReese Member, Mentor Posts: 2,077 1337
    I came to the forum today looking for a solution to this and I'm disappointed. At least I know it doesn't exist
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • joe_dunnejoe_dunne Onshape Employees, Developers, csevp Posts: 198
    edited May 2020
    If I understand what you are asking about. You can drive Onshape configurations, conditionally and or with rules. But the rules have to be controlled externally.  Theoretically any rules engine can be used. As long as you can tie it together using API. 

    There several 3rd party partners who have added their rules logic to drive Onshape configs. If you were to look at gripshape.com. It is basically a rules engine, driving Onshape configurations.  There are a few other online 3D catalogs/configurators being driven today using Onshape.

    https://helioztechnologies.com/onshape  I am not sure if they added any rules. But that is the types of thing Helioz does
    https://getshape.com/    this is an offshoot of the work they did for gripshape. a more generic solution. Part of their secret sauce is the rules engine.

    I have another new partner who is going to be doing some interesting things in this space. This might be a simpler solution for more out of the box configuration controls for Onshape. 

    It all comes down to using the API to drive the Onshape configuration variables.  Something unique to Onshape. 


    Joe


    Joe Dunne / Onshape, Inc.
  • marcus_bernsteinmarcus_bernstein Member, User Group Leader Posts: 35 EDU
    joe_dunne said:
    ...

    Joe,

    Very cool! I didn't know that companies could load configurable products into their sites - these are great demos!

    Thanks for sharing
    -Marcus
    Any chance Onshape is looking for interns?

    Philadelphia User Group Leader
  • harmanpaharmanpa Member, User Group Leader Posts: 11 PRO
    If you visit http://configurator.cae.tech/ you will find a demonstration of configuring an Onshape assembly in a web application. This viewer is completely driven by the configuration parameters in the model, we are currently working on a process of publishing an Onshape model as a dynamic configurator on your own website in just a few clicks - I'd love to get some interested users who would like to try out such functionality?

    thanks

    Pete
Sign In or Register to comment.