How SolidWork records file open time?
How SolidWork records file open time?
Hi again!
I've been working on an in-house Performance benchmarking system and am now considering options to macro-fy some of the tasks.
I have been looking for some hint or notation how or where SolidWorks save the file open time and could it be read with a macro. The thing is that we use 3rd-party PDM and it seems that I need to instruct users to manually open some files from the vault since I think it is not accessible via VBA.
All in all, I want to read and show the user the time that SolidWork registered as 'Open time' which means that document is opened first and then the macro is run by user. Assembly visualization uses 'SW-Open time' as column header and file open time can be seen from file info when cursor is hovered over the file in Windows file explorer.
Any hints? I will continue my research tomorrow, but if I can't find a solution, I will proceed with more manual labor intensive methods.
TIA!
I've been working on an in-house Performance benchmarking system and am now considering options to macro-fy some of the tasks.
I have been looking for some hint or notation how or where SolidWorks save the file open time and could it be read with a macro. The thing is that we use 3rd-party PDM and it seems that I need to instruct users to manually open some files from the vault since I think it is not accessible via VBA.
All in all, I want to read and show the user the time that SolidWork registered as 'Open time' which means that document is opened first and then the macro is run by user. Assembly visualization uses 'SW-Open time' as column header and file open time can be seen from file info when cursor is hovered over the file in Windows file explorer.
Any hints? I will continue my research tomorrow, but if I can't find a solution, I will proceed with more manual labor intensive methods.
TIA!
Sincerely,
JuTu
__________________
Lentäjä on ulkona ja lukossa.
JuTu
__________________
Lentäjä on ulkona ja lukossa.
- mike miller
- Posts: 878
- Joined: Fri Mar 12, 2021 3:38 pm
- Location: Michigan
- x 1070
- x 1231
- Contact:
Re: How SolidWork records file open time?
I don't know how SWX records it, but I know it can be way off the deep end sometimes.
He that finds his life will lose it, and he who loses his life for [Christ's] sake will find it. Matt. 10:39
Re: How SolidWork records file open time?
When you open a SOLIDWORKS file, it is recorded in the FileAccess.log file that SOLIDWORKS creates in the %APPDATA%\SOLIDWORKS folder. The data looks like this:JuTu wrote: ↑Tue May 24, 2022 9:46 am All in all, I want to read and show the user the time that SolidWork registered as 'Open time' which means that document is opened first and then the macro is run by user. Assembly visualization uses 'SW-Open time' as column header and file open time can be seen from file info when cursor is hovered over the file in Windows file explorer.
Any hints?
05/24/2022 14:46:12 OPEN "E:\_EPDM\engineering\oracle\401xxx\401480.SLDPRT"
05/24/2022 14:46:12 OPEN "E:\_EPDM\engineering\oracle\400xxx\400347.SLDPRT"
05/24/2022 14:46:12 OPEN "E:\_EPDM\engineering\oracle\1xxxxx\125665.SLDPRT"
05/24/2022 14:46:13 OPEN "E:\_EPDM\engineering\oracle\400xxx\400348.SLDPRT"
05/24/2022 14:46:13 OPEN "E:\_EPDM\engineering\oracle\400xxx\400349.SLDPRT"
05/24/2022 14:46:13 OPEN "E:\_EPDM\engineering\oracle\421xxx\421028.SLDPRT"
05/24/2022 14:46:13 OPEN "E:\_EPDM\engineering\oracle\1xxxxx\109348.SLDPRT"
05/24/2022 14:46:13 OPEN "E:\_EPDM\engineering\oracle\414xxx\414893.SLDPRT"
05/24/2022 14:46:13 OPEN "E:\_EPDM\engineering\oracle\414xxx\414894.SLDPRT"
05/24/2022 14:46:14 OPEN "E:\_EPDM\engineering\oracle\414xxx\414896.SLDPRT"
05/24/2022 14:46:14 OPEN "E:\_EPDM\engineering\oracle\414xxx\414897.SLDPRT"
If you are opening an assembly, a crude approach would be to find the delta between the first and last timestamps.
Re: How SolidWork records file open time?
mike miller wrote: ↑Tue May 24, 2022 10:09 am I don't know how SWX records it, but I know it can be way off the deep end sometimes.
2022-03-10 15_14_53.jpg
I could use this information now, and I have apparently dismissed this message. I am not seeing it my dismissed messages in System Options. Anyone know what this is called?
Re: How SolidWork records file open time?
Assembly Open Progress Indicator:
- AlexLachance
- Posts: 2174
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2353
- x 2008
Re: How SolidWork records file open time?
Sometimes, the counter keeps rolling if you don't close the window and you end up with numbers like that. I don't know what makes the counter keep on going though.mike miller wrote: ↑Tue May 24, 2022 10:09 am I don't know how SWX records it, but I know it can be way off the deep end sometimes.
2022-03-10 15_14_53.jpg
-
- Posts: 9
- Joined: Fri Sep 30, 2022 11:49 am
- x 1
Re: How SolidWork records file open time?
I add this code to my macros that I want to log/show the process time (open, save, rebuild, etc).
Code: Select all
Dim nStart As Single
Dim TimeElasped As String
nStart = 0
nStart = Timer
'***Process/Task Code Here***
TimeElasped = Format((Timer - nStart) / 86400, "hh:mm:ss")
MsgBox "This model opened in " & TimeElasped & " (hours:minutes:seconds)"