Bounding box of an elevation marker

can anyone tell me how to get the bounding box of an elevation marker the bounding box by element node doesn’t seem to work with this type of input

There is no bounding box for most annotation categories. Try Element.geometry. If that does t work you can try to pull the family type’s geometry, apply any parameter values which deform the element, and then apply the transform properties of the instance to that resulting geometry.

The Element.Geometry node doesn’t seem to work with the elevation marker either.
I don’t know how to pull the family type’s geometry. What I am trying to do is get the room name that an elevation marker is in.

Element.location turn anything up? Try pulling the transform coordinates too.

no that didn’t work either

Hi @Phillip_Sheridan,

Does your elevationmarker contain views ? I remembered this remark in the thread below.
https://forum.dynamobim.com/t/rotate-elevation-marker/18941/5?u=mjb-online

Yes they all do

I think because the elevation marker’s geometry is view specific, you would have to supply a view to get its bounding box. This should work to supply you the bounding box min and max points; you’ll have to adjust it if you wish to handle lists:

import clr

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

elev = UnwrapElement(IN[0])
view = UnwrapElement(IN[1])

bbox = elev.BoundingBox[view]
minPt = bbox.Min.ToPoint()
maxPt = bbox.Max.ToPoint()

OUT = minPt, maxPt
5 Likes

Thanks for that - I don’t know enough Python to make it handle lists though :frowning:

import clr

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

elev = UnwrapElement(IN[0])
view = UnwrapElement(IN[1])
output = []

for (i,j) in zip(elev,view):
    bbox = i.BoundingBox[j]
    minPt = bbox.Min.ToPoint()
    maxPt = bbox.Max.ToPoint()
    output.append([minPt,maxPt])

OUT = output

Have not tested it but assuming you’re using a list of “elevations” and a corresponding list of the same length of “views” then it should work :slight_smile: Alternatively the logic of the script should be clear and you can modify it to fit your need :slight_smile:

I’m trying to name a list of elevations by what rooms the elevation markers are in. I downloaded a dynamo graph but it didn’t work because the bounding box node wouldnt accept elevation marker as an input. It must have worked at some point because they wouldnt publish it if it didn’t ?

Can you show the type of input you would like to go into the python node proposed by Amy? :slight_smile: I’m not sure that I understand you correctly.

Hard to say when we do not know from where you’ve downloaded the graph, generally I do not like to assume that other’s work (though uploaded) is error free.

its graph 4 from here

Hey

Think you have to be in a plan view for the definition to work.

I butchered the graph ages ago now, and its likely nowhere near ideal anymore. Still seems to work fine for me though when tested in 2016

Alisder - ahhh,
I was attempting to butcher your graphs to produce a single graph that would grab all the rooms on a selected level and create the RDS sheets including plans and elevations

What version of Revit and Dynamo you using?

Revit 2017 and dynamo 1.32

Hi, I am new to Dynamo and i have the same issue in Revit 2020 with Dynamo 2.0 and all the packages required. But the elevation marker is not accepted as an element to create a bounding box. I tried all the options shown above. Element.Geometry, Element.BoundingBox etc. Nothing seems to work. Please advise.

The requirement is to rename the markers enclosed within each room.