Time Sheet Helper for Autodesk Inventor

One of the most dreaded tasks I had, when working in a drawing office was my weekly time sheet. I hated it, and the thing I found most difficult was remembering what I had worked on, and when.

Because of this, I have written an iLogic utility to help with time sheets. But before I describe how it works, you may note that its called “Time Sheet Helper“, and it’s exactly that, it is designed to help you know roughly what you were working on and when. It works with Inventor parts, assemblies and drawings, and requires a little bit of setup. Be sure to read the limitations below.

The output of the utility is a daily time sheet that shows how long your worked on a particular file. This log file is updated when a file is closed.

The daily time sheets are saved to “C:\TEMP\TimeSheets”

Setup:

  1. Download the zip file containing the external rules
  2. Unblock the Zip File (Right click > Properties > check Unblock)

3. Find the location of your external rules, copy the .TXT files from the Zip files to this location. The easiest way to find this location, is to go to your external iLogic rules, to right click in the white space, and to then click on “Open Containing Folder” (as shown below).

4. Setup the necessary “Event Triggers” as outlined below:

Go to “Manage” – “Event Triggers

Under “All Documents” set up the triggers EXACTLY as shown below:

That’s it, you’re all set

The iLogic Code:

The utility is made up of 2 external rules. The rules are quite simple and are nicely commented, so should be easy to follow and tweak as needed. For instance if you live in America, you will want to change my date formats.

“Timer OPEN” – The first Rule is called “Timer OPEN“, it is run when a file is opened. “Timer OPEN” creates a folder in your Temp directory called “Timer” (if it doesn’t already exist)

C:\TEMP\Timer

It then saves a .TXT file with the name of the current document to this location, the file contains a timestamp.

“Timer SAVE” – The second rule is called “Timer SAVE”, it is run when the file is saved or closed.

This rule contains a setting for the save interval. The save interval is a set in minutes, any changes to the file that happen in less time than the save interval are ignored, I suggest that this is set to around 3 minutes. It is shown in the code as follows:

HowLongWouldYouLikeTheTimerToBe = 3

The rule does a dirty file check and it then writes out the file info and edit time to the log. The last thing the rule does, is reset the timer by re-running “Timer OPEN”.

LIMITATIONS:

It is not going to give you the accuracy of the TIME command in AutoCAD and is not designed to work like other tools, for instance CAD Tempo which tracks a bunch of time related info.

Here are the known limitations of this utility. If you opened a file at say lunch time, and kept it open without editing it, then came back and edited an iProperty for example, the utility will record that the file was worked on for an hour. If you avoided this sort of behaviour, this utility would work quite accurately. I decided not to make the code do more than it currently does, as I did not want to slow down Inventor.

Notes:

This version of the code was briefly tested in Inventor 2020. 2 & 2021.

Please note that I cannot offer any additional support, this blog post is offered as-is, and is aimed at the more advanced user.

As always, please test all iLogic code extensively on non-production files. Do not use any code in a production environment until YOU have thoroughly tested it and have verified that it works as expected. Always back up any data before running any experimental code. You are ultimately responsible for any iLogic code that you run, so make sure you test it thoroughly!