Element information

Hi everyone,

I was wondering whether it’s possible to access an element’s information i.e who created it, date, etc.

thanks

You’ll need to use the API to do that, you can do something like this:

import clr

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

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

elements = UnwrapElement(IN[0])
creator = []
changer = []
owner = []

for x in elements:	
	tooltip = WorksharingUtils.GetWorksharingTooltipInfo(doc, x.Id)
	creator.append(tooltip.Creator)
	changer.append(tooltip.LastChangedBy)
	owner.append(tooltip.Owner)


OUT = creator, changer, owner
4 Likes

thank you!!!