Hi,
I try to make area boundaries on the certain view but RIR couldn’t find a certain view and sheet. Could anyone give me advice?
Here is python part for helping. I haven’t touch it.
Hi,
I try to make area boundaries on the certain view but RIR couldn’t find a certain view and sheet. Could anyone give me advice?
Here is python part for helping. I haven’t touch it.
Hi,
Since I can’t modify the original my post, I am adding more info.
I have tested to solve this issue but have failed.
It would be great for me if someone can give me comments about it.
Here are revit file(2020) and Gh,
FindView.gh (20.9 KB) FindView.rvt (4.7 MB)
Huh. I edited the python code of the Find View component. Copy and paste into the component and it should work
import clr
clr.AddReference('System.Core')
clr.AddReference('RhinoInside.Revit')
clr.AddReference('RevitAPI')
clr.AddReference('RevitAPIUI')
from System import Enum
import rhinoscriptsyntax as rs
import Rhino
import RhinoInside
import Grasshopper
from RhinoInside.Revit import Revit, Convert
from Autodesk.Revit import DB
doc = Revit.ActiveDBDocument
views = DB.FilteredElementCollector(doc).OfClass(DB.View).WhereElementIsNotElementType().ToElements()
if isinstance(N, str) and N:
view_name = str(N).lower()
for view in views:
if str(view.Name).lower() == view_name:
V = view
break
if isinstance(TOS, str) and TOS:
view_tbname = str(TOS).lower()
for view in views:
tbname_param = view.Parameter[DB.BuiltInParameter.VIEW_DESCRIPTION]
tbname = tbname_param.AsString() if tbname_param else ''
tbname = tbname.lower()
if tbname == view_tbname:
V = view
break
Hi.
Thanks for your help.
It works very well with the Find View component.
There are still two issues.
Sorry for the bugs. Here are the updated components and script
FindView.gh (21.4 KB) Find View.ghuser (3.8 KB) Create Area Boundaries.ghuser (4.2 KB)
Thanks a lot.