Display execution time, older pc dmis version

  • Filter
  • Time
  • Show
Clear All
new posts

  • Display execution time, older pc dmis version

    Hello all

    Im looking for a script of some sort to display the total runtime for a program. I know theres the "execution time" in newer versions of pc dmis, but i have 2011 so thats not an option for me.

    I heard about some assign/start time assign/ end time, can this display the total runtime for a program?
    I just want the operators to know how long the program will be running so they dont have to go in and check on it all the time.

    Thanks for replies

  • #2
    To do it all within your PC-Dmis program you would need to assign the time to a variable at the start of the program and assign the time to another variable at the end. That bit is easy - what's not so easy is doing the maths to work out how long the program was running. Generally, when I have tried to do similar things to this in the past, I have ended up having to convert each time from hours, minutes & seconds into an equivalent total number of seconds. You can then subtract the start time from the end time to give run time (in seconds) and convert this back into hours, minutes, seconds if desired. It ends up being quite a few lines of code which would obviously need to be added to every program. If you have access to visual studio and are proficient in coding then it would probably be better to write an application that launches PC-Dmis and then uses the OnStartExecution & OnEndExecution application events to record the run time. Your app could also add and populate a variable or comment within the program to store the run times. You could put some logic in there so that if the variable exists, it reads the run time and displays it as a message for the operator and if the variable doesn't exist, create it and record the time (as I've previously described).

    This is the code you would need to add inside the start and end of each PC-Dmis program to record the runtime.

    At the beginning
    [LEFT][COLOR=#000000][FONT=Arial][SIZE=12px]            [/SIZE][/FONT][/COLOR][/LEFT]PART NAME  :
    [LEFT][COLOR=#000000][FONT=Arial][SIZE=12px]            [/SIZE][/FONT][/COLOR][/LEFT]REV NUMBER :
    [LEFT][COLOR=#000000][FONT=Arial][SIZE=12px]            [/SIZE][/FONT][/COLOR][/LEFT]SER NUMBER :
    [LEFT][COLOR=#000000][FONT=Arial][SIZE=12px]            [/SIZE][/FONT][/COLOR][/LEFT]STATS COUNT : 1
    the rest of your program goes here
    then at the end
    Neil Challinor
    PC-DMIS Product Owner

    T: +44 870 446 2667 (Hexagon UK office)
    E: [email protected]


    • #3
      Something like neil.challinor 's solution here :


      Related Topics