![]() ![]() Item(1)Įnd If Next End Sub Sub SetRowProps( oCompDef As ComponentDefinition, QTY As Integer, oTotalDict As Dictionary( Of String, Integer), xProduce As Integer) ChildRows Dim oCompDef As ComponentDefinition oCompDef = oBOMRow. Sub RecurseBOMRow( oBOMRow As BOMRow, oTotalDict As Dictionary( Of String, Integer), xProduce As Integer)įor Each oBOMRow In oBOMRow. TotalQuantity * xProduce oTotalDict( CompFullDocumentName) = QTY Next LastIndexOf( "\")ĬompFileNameOnly = CompFullDocumentName. FullDocumentName Dim CompFileNameOnly As String Dim index As Integer = CompFullDocumentName. Item(1)ĭim CompFullDocumentName As String = oCompDef. Activate Exit Sub End Try For Each oBOMRow In oBOMView. PARTS ONLY DISABLED?", "IAM Bulk Drawing Tool") WriteLine( "Making Partsonly QTY's (NOT INTENDED)") ChildRows Is Nothing Call RecurseBOMRow( oBOMRow, oTotalDict, xProduce)Įnd If Next Trace. Item(1)Ĭall SetRowProps( oCompDef, oBOMRow. How does SetRowProps set the amounts though?ĭim oBOMRow As BOMRow Dim oCompDef As ComponentDefinition For Each oBOMRow In oBOMView. SetRowProps Sets the QTY integer which then is passed to the oTotalDict (VBA Dictionary) If it has more rows inside the bom it will call itself RecurseBOMRow travels through the first parts of the assembly (if it has no additional rows) I'm curious about the RecurseBOMRow() and SetRowProps() ![]() ![]() Can anyone help me out in understanding recursive code like the one below? It's not right and I need to fix it for real this time.īUT! I don't quite know how it works. Now, I already found out earlier that the part quantities didn't behave as intended so I 'fixed' it by just reading the parts only quantities. I already 'fixed' it for IPT's but I still get incorrect numbers for assemblies (in large assemblies)įirst example of code is located in Main() I use a copied piece of recursive code in my iLogic Rule and I have some issues. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |