Hi Guys,
I am trying to obtain the “parent” geometric element ID for an analytical element. Being inexperienced with programing I have written a simple Python Script that returns the element ID. But what I want to do to obtain the parent element ID.
When I “snoop” an analytical element I can’t find a parameter that links back to the element ID back to the geometric element.
When I snoop the geometric element I can find a link to the Analytical element ID. Any way of going back the other way?
Python Code
import clr
clr.AddReference(‘RevitAPI’)
clr.AddReference(‘RevitAPIUI’)
from Autodesk.Revit.DB import *
import Autodesk
#@jbenoit44
analytics = IN[0]
hostid = list()
for item in analytics:
_    try:_
_        hostid.append(item.Id)_
_    except:_
_        hostid.append(list())_
OUT = hostid
Thanks for your help
Brett

