Macro Crashes When trying to open SW2008 Assembly??

Hi I was wondering if anybody else has run into the situationI am having.

I am using one of Lenny's macros customized, "InfoFile Macro" toextract custom properties to a text file. All I do is edit thecustom info I want extracted. I use this on large groups ofSolidworks Files, to update database information we keep track of.

When the macro processes the list of files to open, it will opendrawings and parts, but will hang when trying to open SW2008assembly files??? This is driving me nuts. What is causing theproblem, I am not sure. The messege comes up loading, and justfreezes.

I read that there have been some issues opening assemblies in 2008.Another thing that I have noticed after upgrading is Solidworkswill not open an assembly file from windows explorer? It comes upwith error message about SolidWorks Work Directory and not beingable to find the file??

Note: This happens on more than one computer.

Any help would be great!! Lenny's macro worked great on 2007!!!

I have attached lenny's Macro.


Thanks
Rick

Update 4/8/08

I found out that it is the application focus when trying to open anassembly. I you do an Alt Tab and bring Solidworks into theforeground it will finish processing the assembly.

The Question I have is how do I get the solidwoks window to havefocus when using the "opendoc6" call??

I am a visual basic newbie. I know enough to be dangerous.

I have included the Code that opens the assembly to read the custominfo below. I highlighted the call to open the assembly.

Any Help would be appreciated!!!

Thanks Rick


Private Sub CmdProcess_Click()
Dim longErr As Long, longWarn As Long
ProcessStart
ListBoxOutput.ColumnCount = 6
ListBoxOutput.ColumnWidths = "50pt; 30pt; 30pt; 20pt; 20pt; 150pt"' max 300
For Counter = 0 To ListBoxOutput.ListCount - 1
Filename = ListBoxOutput.List(Counter, 0)
SimpleStatus "Processing: " + Filename
FileType = UCase(Right\\\$(Filename, 3))
If FileType = "PRT" Or FileType = "ASM" Or FileType = "DRW" Then
FileOpen = swApp.GetCurrentWorkingDirectory + Filename
If FileType = "PRT" Then
Set ModelDoc2 = swApp.OpenDoc6(FileOpen, 1, &H1, " ", longErr,longWarn)
ElseIf FileType = "ASM" Then
Set ModelDoc2 =swApp.OpenDoc6(FileOpen, 2, &H1, " ", longErr, longWarn)
ElseIf FileType = "DRW" Then
Set ModelDoc2 = swApp.OpenDoc6(FileOpen, 3, &H1, " ", longErr,longWarn)
End If
If Not ModelDoc2 Is Nothing Then
Title = ModelDoc2.GetTitle
Temp = UCase(Mid(Title, (Len(Title) - 6), 7))
NewParseString Title, ".", 1, 0
GetInfoData FileType
Else
ShowInfoUpdate Counter, Title, FileType, "?", "?", "?", "NotLoaded?"
End If
End If
Set ModelDoc2 = Nothing
swApp.CloseDoc Filename
Next Counter
SimpleStatus "Done."
CmdProcess.Enabled = True
CommandExport.Enabled = True
ProcessEnd
If CheckBoxExport = True Then CommandExport_Click
If CheckBoxClose = True Then CommandClose_Click
End Sub

SolidworksApi macros