PDMWorks Enterprise 2008 introduced a new ability to automatically export your BOMs during transitions in your work flow. To date though I had not found any example code of how to extract the information from the XML file once it was created.
Luckily, I caught my buddy Philip Stears deep down in his dark lab writing this little diddy.
'Create the document object ready
Dim document As New XmlDocument()
'Load the document from disk
' Get hold of the root element in the XML file
Dim rootElement As XmlElement = document.DocumentElement
' Go through each element in it called "Property"
For Each childElement As XmlElement In _
' Get the name and value attributes
Dim name As String = childElement.GetAttribute("Name")
Dim value As String = childElement.GetAttribute("Value")
'Do something clever with them
Catch ex As Exception
' Foiled again, try again tomorrow
He was in process of writing the “TakeOverTheWorld” subroutine, luckily I caught Philip just in time. Engineering Data Specialist Man saves the day again!