How to get into revit "date and time" of last run of a dynamo script?

Hi everyone,

I was thinking how could be possible to get into revit the “date and time” of the last time that a certain dynamo script was runned?

I think that it could be really cool for project management to have the possibility to have an schedule into revit with the following information: all the dynamo scripts used in the project, date and time of the last run of each script and the name of the user who executed these last runs.

Best regards,

Alejandro

 

That is a cool idea. I think you could accomplish it pretty easily with a Detail Component. Each Detail component would have a parameter for Date/Time, UserName, And DynamoScript Name. For each Dynamo Script you want to track, you create a Detail Component in your DynamoTracking Drafting View and type in the name of the DynamoScript you wish to track. Your Dynamo Script would then have a section where you have set a String as the official Script Name, and you would search for the Detail Component that has that same Script Name entered. Then you would write the User Name and Date/Time into that element. Provided you have used Shared parameters, you should be able to schedule all of the most recent runs.

Another idea would be to have your Dynamo Script create a new Detail component in the view of your choice each time the script is run, then you could have a full history of the runs inside of Revit.

Hi Ben,

Thanks a lot for your answer and sorry for my delay reply. You were right it was pretty easy to make work this idea.

The approach that I followed was to create first a detail item family with 3 generic annotation famalies nested on it. These 3 nested families where associated to the 3 shared family parameters that I wanted to control with the run of each dynamo script : script name, user name and date time of the last run.

After this step I created the dynamo script by selecting the detail item family that I’ve just created it and pulling from dynamo "the script name"by using an string, "user name"by using a python script that you can find in the forum (http://dynamobim.org/forums/topic/get-the-revit-user-name/) and date/time of the run by using the node “DateTime.Now”

Finally I created and schedule showing these 3 parameters from the detail item family placed in the drafting view for having this information documented :slight_smile:

 

 

 

 

Best regards,

Alejandro