Change design options with slider

Hello everyone

I want simply to have a slider that can change the design options - I’m using archi-lab’s “Get Design Options”. That feels like super basic and there have been several posts on that, but I couldn’t find anything related to this simple task. Hope you can help me out:

The Revit API doesn’t allow you to set the design option for an element programmatically. There are some workarounds suggested in this thread:

2 Likes

Actually I would like to change the design option view for the entire project, not a specific element. So a different group of families (furniture) would change for each value of the slider. The design option parameter value would be manually pre established for each family on the project so I was thinking on some way of simply filtering the families on the entire project view according to the design option value.

Families and Family Types themselves don’t have a design option parameter. Family Instances do, but as noted above you can’t set those using this method.

1 Like

Hey, sorry if I’m being dumb…

Actually I would like to change the design option view for the entire project,

I would describe that as Setting The Primary Option?

The design option parameter value would be manually pre established for each family on the project so I was thinking on some way of simply filtering the families on the entire project view according to the design option value.

I would describe that as setting the Design Option visibility in the view?

It’s unlikely that either of those can be set through the API but let me know if I’m on the wrong track :slight_smile:

Mark

Jeremy is a god… https://thebuildingcoder.typepad.com/blog/2015/03/list-and-switch-design-options-using-ui-automation.html

Something else…
https://forums.autodesk.com/t5/revit-api-forum/how-do-i-get-and-set-the-view-design-option-override/m-p/5209907/highlight/false#M6995

1 Like

@Mark.Ackerley was on the right track here. The answer was indeed in this post: https://forums.autodesk.com/t5/revit-api-forum/how-do-i-get-and-set-the-view-design-option-override/m-p/5209907/highlight/false#M6995

So what Trevor noticed there is that a View has this parameter called “VIEWER_OPTION_VISIBILITY” and by default it looks like this parameter only controls what Tags to show/hide based on specified value, but it also has this hidden functionality where it actually toggles this setting:

image

This is perfect for us, since that will change the design option for the view. Here’s a little script on how to do that:

image

Also a short video of it in action:

2 Likes