Hi is there a way to get the subregions from a selected topo? Want to include them in the mesh thats created
2 Likes
Thanks _Vijay but what if you have multiple topos with subregions. How do you know which subregion is to which? Could end up making funny meshes with a sub region from one topo with another.
Unless I’ve misread your graph then apologies
Hmmmm I could maybe do an intersecting node but topos in different phases could cause issues
How about the Element.BoundingBox and BoundingBox.Contains?
will suit your workflow?
1 Like
thanks Ill give it a try, might still pick up other subregions from other topos though
An example with Python
import clr
import sys
import System
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
import Autodesk.DesignScript.Geometry as DS
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
topo = UnwrapElement(IN[0])
OUT = [doc.GetElement(xid) for xid in topo.GetHostedSubRegionIds()]
1 Like