Message 1 of 3
How to get Properties of sub document
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I wish to find if the iproperties of a children exist.
Here's my progress so far. It only shows the property of the parent even under "For each"
Dim oDoc As Document = ThisDoc.Document Dim oRefDocs As DocumentsEnumerator = oDoc.AllReferencedDocuments Dim partDoc As Document Dim Path As String = System.IO.Path.GetDirectoryName(oDoc.FullDocumentName) 'Dim FileName As String = System.IO.Path.GetFileNameWithoutExtension(partDoc.FullDocumentName) Dim rDisp As String Dim rDispL As String For Each partDoc In oRefDocs Dim FileName As String = System.IO.Path.GetFileNameWithoutExtension(partDoc.FullDocumentName) rDisp = FileName rDispL = Len(rDisp) If rDisp.Substring(rDispL - 6, 4) = "mat0" Or rDisp.Substring(rDispL -6, 4) = "MAT0" Then partDoc.ComponentDefinition.BOMStructure = BOMStructureEnum.kNormalBOMStructure Else If rDisp.Substring(rDispL - 6, 6) = "PRT_SA" And iProperties.Value("Custom","DRAWING_NO") <> "" Then 'Else If iProperties.Value("Custom","DRAWING_NO") = "123" Then partDoc.ComponentDefinition.BOMStructure = BOMStructureEnum.kInseparableBOMStructure MessageBox.Show(Filename, "Title") End If Next