I’ve put together a basic script (see image 2) that reads an excel file to create a number of sheets and assign view templates to them.
This is working fine, however, by default the newly generated floor plans are of a specific floor plan type. The resulting issue is that sheets are located in the incorrect subfolder within the project browser, as the office standard groups plans by floor plan type (see image 1).
I need to change the newly generated floor plans from the system family type ‘A1 - DOCUMENTATION FLOOR PLANS (INDIVIDUAL UNITS)’ to ‘A1 - DOCUMENTATION FLOOR PLANS’ so that they will then display in the correct subfolder.
I’ve had an extensive look online but couldn’t figure out a way to assign a system family type such as a floor plan type as it’s different to assigning a family type parameter. Image 3 shows two nodes I’ve tried to use but don’t seem to be working…
Has anybody done this before? If so could you please point me in the right direction? Any helpful advice or links to similar cases would be greatly appreciated.
I don’t know if there’s any nodes for collecting ViewFamilyTypes in the document, but here i used a simple python script, and then manually pick the desired type:
The script:
import clr
#Import the Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
#Import DocumentManager and TransactionManager
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
#Reference the active Document and application
doc = DocumentManager.Instance.CurrentDBDocument
#Start scripting here:
OUT = FilteredElementCollector(doc).OfClass(ViewFamilyType).ToElements()
Thank you kindly for your reply. Unfortunately python is over my head at this point in time. Out of curiousity, is it simply a matter of copying your script and pasting it into a code block in dynamo? Thanks
Thanks so much for taking the time to post. The approach you suggested worked exactly as intended. I wasn’t familiar with the element types node.
Interestingly enough, while working on another script today I happened to stumble across the Rhythm node ViewFamilyTypes which saves a couple of steps by allowing one to select view family types within the active project from a dropdown list.