Showing posts with label edit. Show all posts
Showing posts with label edit. Show all posts

Monday, October 13, 2014

Creating a Batch Script for AutoCAD with CadTempo

Have you ever found yourself with a large number of AutoCAD drawings that you need to make changes to? It can be a very tedious and time consuming task.


AutoCAD comes equipped with a number of tools that can address this situation. The most simple of these is the script file - which also works with AutoCAD LT. I've used this method many times in the past to process hundreds of drawings at a time. When left to its own devices, the editing time that CadTempo had captured for those drawings was lost. In order to eliminate that problem a script generator was added to CadTempo. This article describes how to create a batch script within CadTempo and reclaim that logged time.


First, we need to enable and display the script maker. Open the CadTempo viewer and navigate to Options, then the Setting tab. Check the checkbox labeled Show Script Maker as shown in the image. *If you operate a different CAD program this will not be enabled. If your CAD program has scripting available please let us know and we will investigate adding its functioning.*




The AutoCAD Script Maker will now be visible when you return to the Files window and you can begin creating your AutoCAD script template.








CadTempo populates the script edit box with a basic script template. You can modify this script to suit your needs, or load a previously saved template. You'll notice there is a placeholder named Filename. When the batch script is created this will be replaced with the drawing names that you select for processing. Once you have determined the script template is functioning properly in AutoCAD you can save the template for future use.

Select the Drawing Files

If you already have multiple folders checked for other viewing or reporting purposes, you can save the current check list for later reloading. From the main menu bar go to File>>Save Check List. Now you can click the Clear Checked button. The button label will change to "Oops..." to immediately restore the checkbox state if needed.

Select the AutoCAD drawing files to be processed by placing a check next to the desired files in the list box. To process all the files in the folder you can place a check in the folder tree. If you wish you can restrict the files to be included in the batch script to a single folder by checking the "This Folder Only" checkbox.

Create the Batch Script


When you click the Create... button you will see a dialog box that displays the list of files that will be included in the batch script.


If you determine the list is incorrect the Cancel button will return you to the Files window and allow you to modify the selected files. Optionally you can add or remove files in the list, however care must be taken to insure each line entry is a valid drawing file name. When you are satisfied with your selection, press OK to create and save the batch script. After saving you will see a message reminding you to keep the CadTempo viewer open during the batch run. The Restore Logged Data button will be enabled.


If you wish to make a final examination before running the script open the saved .scr file. This is the result from the example.



After running the script in AutoCAD (or AutoCAD LT) click the Restore Logged Data button.

We are very interested in building a library of common tasks that can benefit from batch processing. If you would like to share a script template you find useful please send us an email with your template for future inclusion with CadTempo.




Tuesday, August 13, 2013

CadTempo Display Timer

I'm often asked how the timer functions in CadTempo work. I'll explain the basic timers in this article and in a future article I will describe the advanced timing functions that are a part of the new analytics in CadTempo version 6.



The CadTempo Timer Display
 
 

You will note that in this image the optional Task Timer and Activity Timers are enabled and displayed because "Extended Display" is selected as an option within the CadTempoView program allowing the user to view the current information. You can use this display to observe the timing functions of your CadTempo installation - see the help file for further instructions, this is found under: Contents>>CadTempo.exe>>Display Timer.

Let's begin by examining the information that is displayed in the lower section of the display.

Current Session Elapsed Time:

Session Time

You might think of the Session Timer as a time punch clock that you punch in as you begin your day in the morning and punch out when your day is over. But there is a major difference, the CadTempo session timer is started automatically - there is no time clock to punch in or out of.

The CadTempo application is started automatically when the user logs onto the computer. When CadTempo detects that a monitored production application is started, the Session Timer is started and begins its tally. Any monitored production application will start the timer so if you have selected to monitor AutoCAD, Inventor, or Solidworks any of those programs will start the timer. The Session Time will continue to increment while any of the monitored programs remain open. Once all monitored production applications are closed the session time is ended and the results are written to the log. You may witness several session times being recorded throughout the day as you open and close your monitored production applications.

Current Task:

Task Time

When enabled, the Task Timer will prompt the user for a task name based on the list within the CadTempoView Options settings window. If the "When Session Begins" check box has been checked the prompt will appear when a monitored application is started. If left un-checked the prompt will appear upon Windows start up. A user is presented with a prompt as shown:




The visibility of the "Display Timer" button is controlled by an option within the CadTempoView program.

The user may select a pre-defined task name using the drop-down combo box or may enter a custom name. When entering a custom name the custom name is remembered during the CadTempo program's life and will continue to appear in the list, but is not added to the persistent pre-defined list.

The user may enter additional information that is specific to the current task.

An alternate user name may be specified. This may be useful if you or a user is performing a task on another user's computer, however the currently logged on user name is also recorded.

By checking the "Re-Prompt" check box the task timer prompt will be re-issued when a session has been completed.

A user may save the current task at any time by clicking the "CadTempo - Task Timer" in the Windows Task bar and selecting the "Finish" button which becomes visible once a task is started. If Re-Prompt is checked the prompt immediately re-appears to allow beginning a new task.

When a Session is ended the Save Task prompt will appear. The user may save the current task or continue with the current task. If a user elects to continue the current task the user will be required to manually perform a save unless there a log-off (or Lock, etc.) occurs. CadTempo will then perform an automatic save.


Current Idle Time:

Idle Time

The Idle Time is based on a user's keystrokes and mouse movement or button click while a monitored production application is the active window. Each input resets the counter and the timer will increment only when there is no input. By itself, the display of the Idle Timer is intended for understanding the functioning of the related time recordings. Its effect on the other timers will be described in their respective explanations.

Current Activity Time:

Activity Time

The idea behind the Activity Timer is to provide the user with a means of capturing extended time that is spent away from the computer. Often, a user may be interrupted during working hours to attend to a related activity such as a meeting or to consult with other departments. Perhaps a user regularly leaves a CAD program and drawing open during lunch hour or a short personal time break.

The Activity Timer is connected to the Idle Timer. You, as the CAD manager control what is acceptable as a reasonable amount of user idle time. Many users will experience momentary interruptions throughout their day, whether it be a client phone call, a restroom break or a needed diversion such as a brief discussion with a co-worker. The default value for this idle time is set to 5 minutes but you can adjust that up or down to your liking in the CadTempoView program.

When a user becomes "idle" the idle timer will begin counting up to the idle limit that is set. Once the idle limit is reached the Activity Timer begins its count up to its limit. The default activity limit is set to 20 minutes and is adjustable. If a user returns to the computer while under the limit and continues work the Activity Timer is reset to zero and the cycle begins anew.

If the activity timer reaches its limit, a prompt is issued and will be visible when the user returns to the computer. In this way a user can account for his extended time away from the computer rather than relying upon his memory at the end of the day or week to enter into a manual time sheet.

Using the default values of 5 minutes for the idle timer and 20 minutes for the activity timer a user can account for 25 minute (and more) of "away" time.


Finally, let's take a look at the document and user timers that are displayed at the top.

Document and User Timers:

Elapsed Time

The elapsed time is the total amount of time a monitored document type is open and has keyboard and mouse focus. The document may be an AutoCAD drawing, a Revit file, Inventor file or any number of file types you designate and associated with a monitored production application. This value will continuously increment while a document is open. When a user switches to another monitored production application the timer will immediately switch over along with the user and begin (or continue) timing the now current document. Each document retains its own elapsed time as well as the user time of that document.

Multiple users that access the same document are recorded independently and the document time is the accumulated amount of all users.

Edit Time

The edit time is the amount of time a user maintains keyboard and mouse activity within a known document type of a monitored production application. The edit time is affected by the idle timer. If a user is momentarily interrupted, the idle time, up to its limit is considered to be valid editing time. In this way a user is not penalized (not that they should be in any event) for brief periods of inactivity. There are of course many reasonable causes for these periods of idle time.

The resulting difference between Elapsed Time and Edit Time can be used as an indication of efficiency or productivity.

In summary, there is much going on within the CadTempo program to monitor your user activites and to document the time involved in various tasks. It can take a while to understand exactly how CadTempo functions and my hope is that I've described them to your satisfaction.