Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workshared Element User History

6 REPLIES 6
Reply
Message 1 of 7
McCulloughRT
1172 Views, 6 Replies

Workshared Element User History

Hello friends,

 

If I turn on one of the worksharing display modes, and then hover my mouse over any element, I get a popup advising me of who that element was originally created by and who last updated it on the central model, as shown below:

 

workshare.png

 

I've searched through the api help file, and online, but cannot find any description of where this information is stored or if it is even accessible through the API. Does anyone know how I might be able to programatically access these feilds?

6 REPLIES 6
Message 2 of 7
jeremytammik
in reply to: McCulloughRT

In general, I do not believe you will ever be able to see anything whatsoever in Dynamo that is not API accessible.

 

Furthermore, you can look at the Dynamo source code to determine how the data is retrieved, and where from.

 

I have not looked myself, and I am not sure whether this is the right path, but here goes:

 

Each Revit element belongs to one and only one workset. 

 

Its workset can be determined by the Element.WorksetId property. 

 

The workset is derived from WorksetPreview, which offers the Owner property.

 

I hope this helps.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 7
McCulloughRT
in reply to: jeremytammik

Thanks for the reply Jeremy, but I'm a bit confused, as I'm not using Dynamo. If it has some functionality that can retrieve this data for me, then I'm not opposed to using it, but I'd prefer to stick to coded API.

As for WorksetPreview, it appears this will give me the owner of the entire workset (if it has been checked out), but what I'm looking for is the history that Revit appears to store somewhere of which user last updated a specific element with a synchronization to the central model.
Message 4 of 7
McCulloughRT
in reply to: McCulloughRT

Anybody have any ideas? I'm starting to think the API just doesn't provide access to this, but if it does it could be very useful for tracking work and delegating tasks in our firm!

Message 5 of 7
jeremytammik
in reply to: McCulloughRT

I'm asking the development team...



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 6 of 7
jeremytammik
in reply to: jeremytammik

I received an answer, and the access is there:

 

http://thebuildingcoder.typepad.com/blog/2015/11/worksharingutils.html

 

Hooray!

 

Please let us know how it works out for you, preferably with a snippet of sample code.

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 7 of 7
McCulloughRT
in reply to: jeremytammik

Fantastic! Thanks so much Jeremy!

 

I'm working hard on a project deadline on the Architecture side of things right now, but will dive into this after the weekend. I'll be sure and post back with a code example!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community