The element type does not wish to assign or specify names for the view plans.
We need to see which elements they are specifically, but my guess is they will be elements that fall under the view category/class which do not have a valid type such as:
- 3D view templates
- Browsers
- Potentially normal view templates also
- Sheets
Behind the scenes the view class/category encompasses a lot more objects than what we think it would.
What should I do? I need to create ceiling plans and floor plans for each department, such as HVAC and Firefighting. I was considering duplicating the views and then renaming them accordingly.
Hi @younessbadawy , Welcome to the Community,
Try this approach: You can filter, duplicate, and rename the elements. While this might not be the most efficient method, it can help you better understand the process. Give it a try and see if it works for your needs!
Duplicate ans Rename the plans.dyn (19.2 KB)
Python to filter the Floor plan types from documents.
import clr
clr.AddReference('RevitAPI')
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from Autodesk.Revit.DB import FilteredElementCollector, View, ViewType
# Get the active Revit document
doc = DocumentManager.Instance.CurrentDBDocument
# Collect all views
all_views = FilteredElementCollector(doc).OfClass(View).ToElements()
# Filter views by type (Floor Plan)
floor_plans = [view for view in all_views if view.ViewType == ViewType.FloorPlan]
# Output the filtered list
OUT = floor_plans