Who has created that view?

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

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
7 Likes

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??

Hi,

It works like this :

1 Like

Thanks @Alban_de_Chasteigner
It works perfect!

Regards!!

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

1 Like

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) ?

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.

@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

8 Likes

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

Hi there! It worked for me as well. However, how can I match the numbers to the views? For example, it returns a list of 1500 elements with user names but I need the view name next to the person who created it. Can you please advise?

Get the view name from the list of elements and retrieve what you are after, then using the index retrieve the username

Along time ago, i think about get info that, but when we works colaborate, it will be become fear with many colleagues and we often have internal conflicts, some management when checking files also have name representation, so the result of this work is for reference only, I estimate we what Can see the full history including date. :slightly_smiling_face: