I found a python script that accurately finds the point of an elevation marker. (For some reason, the scripts that require the active view do not provide the the marker location, just a point that is associated with the view.)
import clr
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
em = UnwrapElement(IN[0])
if em.HasElevations:
OUT = doc.GetElement(em.GetViewId(2) ).Origin.ToPoint()
else:
OUT = "this marker has no views"
(My view ID happens to be 2 instead of zero; this was intentional).
The problem is that it doesn’t seem to work very well with lists; I can only feed in one elevation marker.
I am not very familiar with python though and I was wondering if someone could help me out.
Thanks @jacob.small, I will give it a shot.
Also, would you know how to add an input for the view Id?
Sometimes the index is 2, but other times it is 0.
Never mind that last question. @jacob.small, that was very helpful.
I have to correct myself though - the python script that you want to use for this task is the one shown below. I guess it helps if your Dynamo preview is not turned upside-down
Hi @daniel1
Did this work for you? The first Python script you posted worked for me but, as you say, it only works with one elevation marker. I can’t seem to get the latter script to work though. Did I miss a step?