Message 1 of 2
how does I get the title and subject properties?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
how do i read the title and Subject like i read desciption in my code ?
Class BOMEXport
Shared oHoleRepportExcel As String
Private oBrowserpane As BrowserPane
Private AssFeats As New List(Of String)
Private PartFeats As New List(Of String)
Shared PartNumberOfParents As String
Shared PartNumberOfParents2 As String
Sub main()
Dim docForSubtype = ThisDoc.Document
Dim sDocumentSubType As String = docForSubtype.SubType
If sDocumentSubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Or sDocumentSubType = "{4D29B490-49B2-11D0-93C3-7E0706000000}" Or sDocumentSubType = "{BBF9FDF1-52DC-11D0-8C04-0800090BE8EC}" Then
MessageBox.Show("files type not supportede", "Title")
Exit Sub
End If
oHoleRepportExcel =""
PossibleIssueReport()
End Sub
Sub PossibleIssueReport()
Dim oDoc As AssemblyDocument
oDoc = ThisApplication.ActiveDocument
Dim oBOM As BOM
oBOM = oDoc.ComponentDefinition.BOM
oBOM.StructuredViewEnabled = True
oBOM.StructuredViewFirstLevelOnly = False
oBOM.StructuredViewDelimiter = "."
oBOM.PartsOnlyViewEnabled = True
Dim oBOMView As BOMView
oBOMView = oBOM.BOMViews.Item("Structured")
debug("Call ExportToExcel")
Call ExportToExcel(oBOMView.BOMRows)
'Add To Clipboard(Copy & past fuction)
Clipboard.SetText(oHoleRepportExcel)
End Sub
Public Sub debug(txt As String)
Trace.WriteLine("NTI : " & txt)
End Sub
Public Function ExportToExcel(brows As BOMRowsEnumerator)
Dim brow As BOMRow
For Each brow In brows
Dim rDoc As Document
rDoc = brow.ComponentDefinitions.Item(1).Document
debug("Error after next")
Dim docPropertySet As PropertySet
docPropertySet = rDoc.PropertySets.Item("Design Tracking Properties")
Dim docPropertySet1 As PropertySet
docPropertySet1 = rDoc.PropertySets.Item("User Defined Properties")
If Not brow.ChildRows Is Nothing
If docPropertySet.Item("Document SubType Name").Value <> "Part" Then
End If
Try
Catch
MsgBox("Fail")
End Try
oHoleRepportExcel = oHoleRepportExcel & docPropertySet.Item("Part Number").Value & " " & docPropertySet.Item("Description").Value & " " & "Title"& " " & "Subject" & vbLf
'Subject
Call ExportToExcel(brow.ChildRows)
End If
oHoleRepportExcel = oHoleRepportExcel & docPropertySet.Item("Part Number").Value & " " & docPropertySet.Item("Description").Value & " " & "Title" & " " & "Subject" & vbLf
Next
End Function
End Class