The second rule for "inseperatable" when a filename containt "L" is nog working yet. Can anyone help me. The code i have now stands below. The problem is
If oCurFile.Name.Contains("L") Then
The complete file
Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument
oAsmName = ThisDoc.FileName(False) 'without extension
Dim oRefDocs As DocumentsEnumerator
oRefDocs = oAsmDoc.AllReferencedDocuments
Dim oRefDoc As Document
'work the referenced models
For Each oRefDoc In oRefDocs
Dim oCurFile As Document
oCurFile = ThisApplication.Documents.Open(oRefDoc.FullFileName, True)
oCurFileName = oCurFile.FullFileName
'defines backslash As the subdirectory separator
Dim strCharSep As String = System.IO.Path.DirectorySeparatorChar
Try
If oCurFile.Name.Contains("L") Then
oCurFile.ComponentDefinition.BOMStructure = BOMStructureEnum.kInseparableBOMStructure
End If
Catch
'MessageBox.Show("Error processing " & oCurFileName, "ilogic")
End Try
oCurFile.Close
Next