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.

ENUM LIST

papawopapawo PROMember, Developers Posts: 206 PRO
edited February 2018 in FeatureScript
can i add something in the enum list using user input in the precondition? is it possible?
Tagged:

Answers

  • mahirmahir ✭✭✭✭ Member, Developers Posts: 865 ✭✭✭✭
    Enums are basically constants. I don't think you can edit them at runtime. However, you can control visibility of individual inputs based on conditional logic. If the variability of your enum isn't too great, you can create multiple enums and have different list inputs using different enums. Then, depending on a previous input, you can choose which list input to show. Your postcondition would need to know which input to use.
  • MBartlett21MBartlett21 EDU Member Posts: 1,640 EDU
    @mahir

    Couldn't he also use a Lookup Table?
    MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)
  • mahirmahir ✭✭✭✭ Member, Developers Posts: 865 ✭✭✭✭
    @mbartlett21, yes that's true. I don't have any personal experience with lookup table implementation, but here's a helpful link. 
    https://forum.onshape.com/discussion/comment/20104#Comment_20104
  • MBartlett21MBartlett21 EDU Member Posts: 1,640 EDU
    @mahir
    Neither do I
    MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)
Sign In or Register to comment.