Sure, just replace “m_desk” with your desired family name and replace “1525 x 762mm” with your desired type. I’ve also posted some other useful stuff that I usually use in my codes.
# Get All Family Types Of Specific Family
allfamtypes = [x for x in FilteredElementCollector(doc).OfClass(FamilySymbol).ToElements() if "m_desk".lower() == x.FamilyName.lower()]
# Get Specific Family Type Of Specific Family
specificfamtype = [x for x in FilteredElementCollector(doc).OfClass(FamilySymbol).ToElements() if "m_desk".lower() == x.FamilyName.lower() and x.GetParameters("Type Name")[0].AsString().lower() == "1525 x 762mm".lower()]
# Get Specific Family
specificfamily = [x for x in FilteredElementCollector(doc).OfClass(Family).ToElements() if "m_desk".lower() == x.Name.lower()]
Full Code
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
# Get All Family Types Of Specific Family
allfamtypes = [x for x in FilteredElementCollector(doc).OfClass(FamilySymbol).ToElements() if "m_desk".lower() == x.FamilyName.lower()]
# Get Specific Family Type Of Specific Family
specificfamtype = [x for x in FilteredElementCollector(doc).OfClass(FamilySymbol).ToElements() if "m_desk".lower() == x.FamilyName.lower() and x.GetParameters("Type Name")[0].AsString().lower() == "1525 x 762mm".lower()]
# Get Specific Family
specificfamily = [x for x in FilteredElementCollector(doc).OfClass(Family).ToElements() if "m_desk".lower() == x.Name.lower().lower()]
OUT = allfamtypes,specificfamtype,specificfamily
PVPs are the best. They are cumbersome to write, but many times I have accelerated codes by using them, and honestly it also makes them more stable and potentially effective in multiple languages.