Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I'm trying to figure out how to access the active Design Option in a Revit file. I have figured out how to collect all of the options in the file using a filtered element collector, but I don't know how to find which one is currently active. Is this available in the API? All I have managed to find so far is whether or not an option is "Primary"
Here is my code as it stands now, just collecting the options and getting their names (using python in Rhino Inside Revit):
import clr
clr.AddReference('System.Core')
clr.AddReference('RhinoInside.Revit')
clr.AddReference('RevitAPI')
import Autodesk
from System.Linq import Enumerable
from Autodesk.Revit.DB import *
from Rhino.Geometry import *
from RhinoInside.Revit import Revit, Convert
doc = Revit.ActiveDBDocument
Design_Options = []
designOp = FilteredElementCollector(doc).OfClass(DesignOption).ToElements()
for i in designOp:
Design_Options.append(i.Name.ToString())
Thanks!
Solved! Go to Solution.