Hi everyone.
I am doing an extraction of elements from linked models, the problem is that I get all the elements from Design Options. I realized that when comparing the number of Elements in Revit Schedules vs the number of elements that I get in Dynamo using a Python script, just as you can see in the attached image.
Does anybody know how to prevent my script from extracting data from Design Options?
Also this is the code snippet that I’m using to get the elements:
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
import System
from System.Collections.Generic import *
doc = DocumentManager.Instance.CurrentDBDocument
category = IN[0]
bin = System.Enum.ToObject(BuiltInCategory, category.Id)
links = FilteredElementCollector(doc).OfClass(RevitLinkInstance).WhereElementIsNotElementType().ToElements()
elementos = []
for link in links:
doclink = link.GetLinkDocument()
coll = FilteredElementCollector(doclink).OfCategory(bin).WhereElementIsNotElementType().ToElements()
elementos.append(coll)
OUT = elementos