I regularly visit your site, and have recommended it to others. As far as Solid Edge, this is THE site to get help from. Great Job to all!
I have never been able to get a fully successful BOM from Solid Edge. I was using recursion and the occurances object, and was semi-successful, but the Excel worksheets (SmartFrames2d), that at least for us, hold the part materials and thier qty per parent, have been elusive. I believe it to be an Excel issue... the dreaded "call was rejected by callee" error telling me that Excel is still busy with its last job... Then I came across the SEPartReader.dll and WOW, how much easier and quicker it is for getting occurances. Works great and I am thrilled. But.... using DraftDataAPI.dll to get the sheet data only seems to get a picture of the data (emf file). Is there a way to get the Excel worksheet data without opening Excel within Solid Edge? Am including the (working) code for occurances and the draft emf in case anyone else is interested in it
Thanks again for the great help!
Dim objSEREADERLib As New SEREADERLib.SEFileReader
Dim objAttClass As SEREADERLib.AttachmentClass
Dim objAttmnts As SEREADERLib.Attachments
If File.Exists("C:\Temp\73014012.asm") Then Kill("C:\Temp\73014012.asm")
File.Copy("ServerPath\73014012.asm", "C:\Temp\73014012.asm")
objSEREADERLib.Open("C:\Temp\73014012.asm")
objAttmnts = objSEREADERLib.Attachments()
Dim iAttCount As Integer = objAttmnts.Count
Dim i As Integer
For i = 1 To iAttCount
objAttClass = objAttmnts.Item(i)
msgbox(objAttClass.Filename())
Next
Dim objDraftReader As New DRAFTDATAAPILib.DraftInfo
objDraftReader.Open("ServerPath\73432005.dft")
Dim intShtCount As Integer = objDraftReader.GetSheetCount()
Dim mSheetInfo As DRAFTDATAAPILib.DraftInfoClass
Dim n As System.UInt32 = Convert.ToUInt32(objDraftReader.GetCurrentSheetIndex)
Dim rWid As Double = 0
Dim rHgt As Double = 0
For i = 1 To intShtCount
objDraftReader.SetMetafileName("C:\Temp\73432005.emf")
objDraftReader.GetEnhMetafile(n, rWid, rHgt)
Next