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 feature suppression?

maximilian_schommermaximilian_schommer Member Posts: 32 ✭✭
Does anyone know if there is a way to suppress previous features in featurescript? I can select the features and get the feature id and function, but don't know how to do anything with it. It seems like there might be some fundamental issues with this problem since feature studios build linearly, and a future feature suppressing a past feature would require some pre-processing that I'm not sure is being done.

Comments

  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    I don't think it is possible, if you look at the code of part studio you will see each feature call is wrapped in "if (true){}" if feature is active or in "if (false){}" if feature is supressed. so supression is not in the scope of feature responsibility itself. moreover later features can't change arguments of prevous ones.
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,686
    One of the tenets of FeatureScript is that it cannot modify other features. It can modify bodies of course but only at that point in the regeneration history. 
    Senior Director, Technical Services, EMEAI
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,686
    Your best bet would be to instantiate a configuration. 
    Senior Director, Technical Services, EMEAI
  • maximilian_schommermaximilian_schommer Member Posts: 32 ✭✭
    Ok, that makes sense. I have a configuration that I'm trying to make "responsive", as in some parts of the configuration become activated as certain conditions are met. I just saw @ilya_baran s instantiator, and am probably going to just make the entire studio into a feature so I can do the configurability within a single feature.
Sign In or Register to comment.