Hi,
i try to get all section element in view .
is it possible?
What do you mean?
All 3D Elements or 2D Elements?
KR
Andreas
I mean all “Sections” in view…
Here is my workflow for getting all the views that have a sectionline in the active view:
- Get all elements of category in view, category = views.
- String from object, get all items with the String “Element”, these are the sectionlines. (Yes thats really the only way i know to identify sectionlines)
- Element Parameter, get view name.
- List all views in project and get the views by their name.
I´m sorry, first step in my workflow is selecting section lines manually.
It was just a guess that selecting all elements in view will give you the sectionlines, but they don´t.
The All Elements in Active View node is also no help…
Some python to help
import clr
import System
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
views = FilteredElementCollector(doc, doc.ActiveView.Id).OfCategory(BuiltInCategory.OST_Viewers).ToElements()
OUT = views
Thanks,
i success getting the “Section” (maybe it the symbol itself but not the view)
how do I get the view/view id from the section?
I thought about 2 workflows but I’m feeling there is a better one and I missing something:
- I found that the view id number is +1 from the section id number. (i don’t know if it was a coincidence)
- get section name and then look for all view lists by the same name
thanks
Thats the way to go, like I´m doing it in one of the above screenshots.
Because this won`t work without a python code so i would recommend to use a code that gets the sectionlines and also gives you the views as output.
Find the code by @Hyunu_Kim here:
Very interesting in this “new” OST Category I just learned.
what is “Viewers” ??