Who has created that view?


#1

Hi Everyone,

In a collaborative work environment, it’s possible to detect who has created a specific view??..(f. e. as Revit shows who has created a model element)

image

Very grateful for your help.
Regards


#2

Hi,

Yes it possible. You can know who created the view and who made some changes.

import clr
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

# Import RevitAPI
clr.AddReference('RevitAPI')
import Autodesk
# Import Revit Nodes ¿?
clr.AddReference("RevitNodes")
import Revit
# Import from Revit DB
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

input = UnwrapElement(IN[0])
creator = []
lastChange = []
for i in input:
	creator.Add( WorksharingUtils.GetWorksharingTooltipInfo(doc, i.Id).Creator)
	lastChange.Add(WorksharingUtils.GetWorksharingTooltipInfo(doc, i.Id).LastChangedBy)
	
#Assign your output to the OUT variable.
OUT = creator, lastChange

#3

Thanks @Alban_de_Chasteigner

It works perfect for those elements who has the “Create by/Last Update” property (I tested with Viewports)

But, when I try with Views…it fails. Maybe is due the views doesn’t work with that parameters??


#4

Hi,

It works like this :


#5

Thanks @Alban_de_Chasteigner
It works perfect!

Regards!!


#6

Hi @veas87,
You’re welcome.
Please mark a post as solution to facilitate similar researchs in the future.


#7

not in dynamo alone but also in revit I was wondering if there is any way to find who deleted an element ( especially when you don’t know the element ID) ?


#8

To my knowledge, you only have the worksharing display settings wich can inform you on the status of an item.
But it is useless to find who deleted an element.

The best way is probably to compare different Revit saving files.


#9

@Alban_de_Chasteigner great solution thanks for sharing.

Also worth noting if user doesn’t feel comfortable using Python and instead would want to just install Archi-lab.net package there is a node there that does just that:


image


#10

Great !
I didn’t notice that node. Thanks for the information !