Message 1 of 13
How can I get the Parent Document and the Parent Document Bomstructure of a document?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How can I get the Parent Document and the Parent Document Bomstructure of a document?
It's like I'm not getting it right.
It doesn't seem to be a problem in VBA, but it doesn't work in iLogic.
Help. Driving me nuts...
'sParentDocument_LOG = occ.ParentOccurrence.Definition.Document.ToString ' Gives System.__ComObject
'sParentDocument_LOG = occ.ParentOccurrence.Definition.Document ' Gives nothing
'sParentDocument_LOG = oDoc.Parent.ToString ' Gives System.__ComObject
'sParentDocument_LOG = oDoc.Parent.ComponentDefinition.document.fullfilename ' Gives nothing
'sParentDocument_LOG = occ.Parent.Document ' Gives nothing
'sParentDocument_LOG = occ.Parent.Document.ToString ' Gives System.__ComObject
'sParentDocument_LOG = oDoc.Parent.Document.ToString ' Gives nothing
'sParentDocument_LOG = oDoc.ParentOccurrence.Document.ToString ' Gives nothing
'sParentDocument_LOG = oDoc.ParentOccurrence.Document ' Gives nothing
'sParentDocument_LOG = oDoc.Parent ' Gives nothing
'sParentDocument_LOG = occ.ParentOccurrence.ToString ' Gives System.__ComObject
'sParentDocument_LOG = occ.ParentOccurrence.fullfilename ' Gives nothing
'sParentDocument_LOG = oDoc.Parent.fullfilename ' Gives nothing
'sParentDocument = oDoc.Parent.fullfilename ' Gives nothing
' Poging on te kijken of het uitmaakt hoe ComponentDefinition wordt gekregen
'If oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
' Dim assemDoc As AssemblyDocument = doc
' 'params = assemDoc.ComponentDefinition.Parameters
' sParentDocument = assemDoc.ComponentDefinition.Document ' Gives nothing
' sParentDocument = assemDoc.Parent ' Gives nothing
' sParentDocument = assemDoc.Parent.document ' Gives nothing
' sParentDocument = assemDoc.Parent.ComponentDefinition.Document
'ElseIf oDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
' Dim partDoc As PartDocument = doc
' 'params = partDoc.ComponentDefinition.Parameters
' sParentDocument = partDoc.ComponentDefinition.Document ' Gives nothing
' sParentDocument = partDoc.Parent ' Gives nothing
' sParentDocument = partDoc.Parent.document ' Gives nothing
' sParentDocument = partDoc.Parent.ComponentDefinition.Document
'End If
''Dim userparams As UserParameters = params.UserParameters