
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
First post here, but needed at this time. I tried to find a solution searching again and again on the web, without success.
Working on Inventor Professional 2015 SP2 Build 223
I'm working on an iLogic rule to create a BOM which will be exported in an excel template.
I have multiple problems :
Problem 1 :
I can't create a BOM if there isn't one already.
My code, is very basic :
iLogicVb.UpdateWhenDone = True Dim ThisDrawDoc As DrawingDocument = Nothing ThisDrawDoc = ThisApplication.ActiveDocument ThisSheet = ThisDrawDoc.ActiveSheet Dim DrawingPartList As PartsLists = ThisSheet.PartsLists Dim BomPlacementPoint As Point2d Dim SheetBorder As Border SheetBorder = ThisSheet.Border BomPlacementPoint = ThisApplication.TransientGeometry.CreatePoint2d(0, SheetBorder.RangeBox.MaxPoint.Y) DrawingPartList.Add(ThisDrawingView,BomPlacementPoint)
If a part list already exist, it works fine. But if there is no part list, I have this error prompting :
Erreur de règle: math_BOM - Export de liste de piece client, dans le document assemblage.idw Paramètre incorrect. (Exception de HRESULT : 0x80070057 (E_INVALIDARG))
I don't know why the argument is not valid. It's very strange.
Did anyone already have this problem?
Problem 2 :
I want to be able to delete the BOM I just create with the rule.
I didn't find the function of the class PartsLists.
I guess it's something like that :
Dim ThisDrawDoc As DrawingDocument = Nothing ThisDrawDoc = ThisApplication.ActiveDocument ThisSheet = ThisDrawDoc.ActiveSheet Dim DrawingPartList As PartsLists = ThisSheet.PartsLists DrawingPartList.Delete.Item(DrawingPartList.count)
But it doesn't work.
Is there a documentation where I can find class descriptions of Inventor? Like every functions of class PartsLists?
Thanks!
Math
Solved! Go to Solution.