Extensible Storage


#1

Hi,

Can we invoke extensible storage in/by dynamo by any means?
It seems like calling an Excel sheet to store temporary values is a way of doing things, but can it be done in a smarter way? I’ve created shared parameters to store something like “original viewtemplate name” when merging viewtemplates, because i needed these values to restore original viewtemplates. But that is just an example of something bigger. https://forum.dynamobim.com/t/merge-two-view-templates/
http://thebuildingcoder.typepad.com/blog/2015/02/extensible-storage-in-a-worksharing-environment.html

Marcel


Excel Data into Revit
#2

Marcel,

I don’t see why not. Question is: Is it worth the hassle? Extensible Storage is quite hard to set up quickly. It almost makes sense to use it in some extreme cases. Here’s a link on my blog to how to set it up, you would just need to translate from C# to Python or use ZeroTouch.


#3

Hi Konrad,

Would this be an opening to storing whose done what in a revit model? Time, date?
When all my colleages say they didnt do it :slight_smile: and learn something new

Marcel


#4

Monitoring their activities at all the time? Using like a DocumentChanged event? That would be insane. I am sorry you will slow them down to a halt. If anything i would go for at synch time, get the document saved out and parse it for changes over previous model version. That’s not impossible but its more than Dynamo can handle I am afraid. You would need a database to store the model, something like MongoDB or SQL. It’s not worth going after this over a few modeling mistakes.


#5

Hi Konrad,

I see what your getting at, tho storing who did edit an element last is kind of handy i suppose.
But that doesnt exclude the question of temporary storage of parameter values.
Im trying to broaden my horizon here, i appreciate your willingness to go with me, contemplating/ theorizing
Marcel


#6

Well you already have that information when you enable worksharing display. Revit doesn’t store anything additional to that i am afraid. Well you can store some parameter values that’s not an issue. Then we are back to my original question, why bother with setting up a heavy duty storage system when you can just use a parameter and be done with it in couple of minutes. It’s the time/benefit ratio here.


#7

@Konrad_K_Sobon,

I do have that information while they are still in the file, but not days after theve editted it and relinquest it, am i right? That would be a hassle indeed, to keep up with edits online, i would like to store who editted last, and thought about storing that in extensible storage. I dont want to access their journal files to prove “who did it”, not pointing fingers or what. Just opening up the database to temporary “things” like you would use excel for, and ok maybe speak to the person accountable so they can learn and improve.

Marcel


#8

yes, so you just answered your own question. that information is in the file, constantly changing and then gets wiped during synch process. So the idea would be to capture it at synch time. if you want to capture it all at synch and store as extensible storage then you will basically have to intercept synch process, extract what you need, save to storage, then let the synch continue. That’s 4 large tasks that Dynamo is not capable of. You need to subscribe to synch events and that can be done by a revit plug-in on startup. Dynamo won’t do that for you. You are looking at writing an external command for revit/plug-in.


#9

I see who editted, on my screen, in the properties (me) if i edited an element, that data is available apparently, why not write this data to the database? This data might only be available in some cases tho.
Marcel


#10

Hi @Marcel_Rijsmus,

I think Konrad makes some pretty good points already, but I also think Dynamo would not be a good format if you wanted to record what people are up to in the model - although it would be handy to know when an element was last updated, but more so I could see when it was updated so I could compile a change register between dates (I know you can compare 2 models but to have the data just sitting there would be nicer in my opinion)

Problem is, all team members that are active within the model will have to have Dynamo open and that particular script running ALL the time, I’d say if they are prone to making mistakes or forgetting to do things the correct way or just plain lazy, so much so that you need to keep track, then I would think that they would also accidentally (or conveniently) forget to run or even open the script. :stuck_out_tongue_winking_eye:

Anyway, bit off topic, most things you can do with the API in C# you can do with Dynamo, I would think Extensible Storage would also work although I rarely ever use it to be honest so haven’t even thought to look.

Cheers,
Dan


#11

@Daniel_Woodcock1

Sure, and i also know it would be a hassle to make a script that runs all the time.
But how about using the Save to Central command as a trigger to write values to another field in the database.

Anyways,
Thanks, its been nice brainstorming about this.

Marcel


#12

Hello Marcel,

Maybe this is a lightweight version of what you are looking for:

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

It will look at your local file and give you the same information as looking at the worksharing visibilty options. Just feed it the elements you want to examine. My example file looks at all MEP objects.Worksharing element checkout owners.dyn (28.8 KB)


Workset Parameter Created By
Worksharing info for Revit element
#13

@T_Pover

Dankje Taco.


#14

Hello Taco,
I have a problem that I think will be solved with the code you have written above. Would You can give me more advice on it?
We had two copies of a single Revit file and two different group of people worked on them seperately but simoltanously. (Unfortunaly) Now we need to merge them both to save as much work as we can. I think about Worksharing and “LastChangedBy”. But I dont know hot to read it with dynamo :frowning:


#15

Hello Maryam,

I don’t really understand how the ‘LastChangedBy’ information is gonna help you merge the two files. If you are looking for a way to check for double elements in both files then I don’t think this will help much as you cannot compare element IDs (these will be different on both files).


#16

Actually I am looking forward to find the elements last changed by a certain user in one file and move them to the other file


#17

Fortunately I found my answer here:

I used “Element.GetWorksharingTooltipInfo” node from archi-lab package.

Thanks Taco