I dump the master assembly parts list to provide a spreadsheet to our purchasing department.
However as the parts list may be in several segments (On separate sheets sometimes) I do not get the entire thing to dump.
To solve this issue I create a temporary blank sheet and add a temporary part list in full on it.
Since I am using it for dumping only I do not care if it stretches beyond the paper boarder.
This worked flawlessly in Inventor 2011 and 2014.
In 2015 however the Item numbers appear to be alloted differently from the original parts list.
Tearing my hair out over this one.
Hi,
I am not finding a known issue like this. Can you provide a code example and files that will allow me to research for a solution?
Thanks,
Wayne
Sorry for not getting back sooner Wayne.
As stated before my program adds a temporary drawing sheet to my existing master drawing that contains the original parts list.
I add the parts list again to the temporary drawing sheet,
modify cells for material export,
and dump it to an Excel workbook,
then destroy the temp sheet.
The workbook is sent to our purchasing department. I do this so as not to modify the orignal parts list.
What I was doing in 2014 was using the driving master assembly document as a parameter to create the temporary parts list.
That process seems to renumber the items in 2015. (Master.iam BOM vs Master.idw Parts list.)
I found a fix.
From the original parts list I derive the driving ParentView.
I use this ParentView as the parameter for the create parts list method.
I now end up with the items numbers as they should be.
--- Code Sample Follows ---
'...
Dim CurrDwg As Inventor.DrawingDocument
Dim CurrSheet As Inventor.Sheet
Dim CurrPartsList As Inventor.PartsList
Dim CurrView As Inventor.DrawingView
Set CurrDwg = ThisApplication.ActiveDocument
Set CurrSheet = CurrDwg.ActiveSheet
Set CurrPartsList = CurrSheet.PartsLists(1)
Set CurrView = CurrPartsList.ParentView
Set CurrPartsList = Nothing
Set CurrSheet = Nothing
Set CurrDwg = Nothing
sTempFile = DSIZE_TEMPLATE_FILE
Set oDwg = ThisApplication.Documents.Add(kDrawingDocumentObject, sTempFile, False)
Set oSheet = oDwg.Sheets.Add(kDDrawingSheetSize, kLandscapePageOrientation, "TempDSsize")
oSheet.Activate
ThisApplication.ActiveView.Fit
Set oTrans = ThisApplication.TransientGeometry
Set oPt = oTrans.CreatePoint2d(34 * 2.54, 22 * 2.54)
'====
'Set oPartsList = oSheet.PartsLists.Add(oMasterAssy, oPt, kPartsOnly) 'No longer works as of 2015
Set oPartsList = oSheet.PartsLists.Add(CurrView, oPt, kPartsOnly) 'Use this instead
'====
oMasterAssy.Update2 True
Set CurrView = Nothing
.
.
.
Call oPartsList.Export(sTargetFile, kMicrosoftExcel, "Materials")
To be honest I find the whole BOM vs Parts List connection confusing to say the least.