Sub Main iProperties.Value("Custom", "children") = FilenamesPropertyValue(ThisDoc.Document) End Sub Function FilenamesPropertyValue(ByVal doc As Document) As String Dim filenamesList As String = String.Empty Dim separator As String = "|" ' or use this: Dim separator As String = vbTab Dim filenamesCount As Integer = 0 For Each refDoc As Document In doc.AllReferencedDocuments If (IncludeParameterIsTrue(refDoc)) Then Dim filename As String = IO.Path.GetFileName(refDoc.FullDocumentName) ' or use this: Dim filename As String = IO.Path.GetFileNameWithoutExtension(refDoc.FullDocumentName) If (filenamesCount > 0) Then filenamesList += separator filenamesList += filename filenamesCount += 1 End If Next Return filenamesList End Function Function IncludeParameterIsTrue(doc As Document) As Boolean Dim oParams As Parameters = GetParameters(doc) If (oParams Is Nothing) Then Return False Try Dim includeParam As Parameter = oParams("include") Return Convert.ToBoolean(includeParam.Value) Catch ex As Exception End Try Return False End Function Function GetParameters(ByVal doc As Document) As Parameters Dim oParams As Parameters = Nothing If (doc.DocumentType = DocumentTypeEnum.kPartDocumentObject) Then Dim oPartDoc As PartDocument oPartDoc = DirectCast(doc, PartDocument) oParams = oPartDoc.ComponentDefinition.Parameters ElseIf (doc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject) Then Dim oAssemDoc As AssemblyDocument = DirectCast(doc, AssemblyDocument) oParams = oAssemDoc.ComponentDefinition.Parameters ElseIf (doc.DocumentType = DocumentTypeEnum.kDrawingDocumentObject) Then Dim oDrawDoc As DrawingDocument = DirectCast(doc, DrawingDocument) oParams = oDrawDoc.Parameters End If Return oParams End Function