Specifically "Renumber items sequentially" as shown in the screenshot. I would like to make an iLogic script that'll turn off that setting every time I open an assembly.
I often have to maintain large assemblies where the print bubbles need to match an external database. This setting causes me all sorts of problems, because a minor change to the subcomponents can shuffle all of the item numbers, resulting in an hour of work renumbering the partslist and pushing the overrides back into the assembly.
Our newest templates have this setting off by default, but there is a substantial chunk of data that has it turned on. When this feature was added to inventor, it was on by default and there wasn't a way to turn it off in templates, so anything we made in the intervening time has it turned on unfortunately.
I dug through the API docs, but I wasn't able to find anything that looked promising.
Solved! Go to Solution.
Solved by WCrihfield. Go to Solution.
Solved by WCrihfield. Go to Solution.
Hi @nbonnett-murphy. Yes. Once you get to the BOM object (under the AssemblyDocument.ComponentDefinition.BOM), that BOM objec has those properties that you can change the values of.
BOM.HideSuppressedComponentsInBOM, which is a Boolean (True/False)
and
BOM.RenumberItemsSequentially, which is also a Boolean
Wesley Crihfield
(Not an Autodesk Employee)
Here is a simple iLogic rule to turn both of those settings off, if you run the rule while an assembly is active.
Sub Main
If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kAssemblyDocumentObject Then Exit Sub
Dim oADoc As AssemblyDocument = ThisDoc.Document
Dim oBOM As BOM = oADoc.ComponentDefinition.BOM
oBOM.HideSuppressedComponentsInBOM = False
oBOM.RenumberItemsSequentially = False
If oADoc.RequiresUpdate Then oADoc.Update2(True)
End Sub
Wesley Crihfield
(Not an Autodesk Employee)
Actually those were both introcuded in the 2023 version of Inventor, so they do not show up in the online help until you are in those versions of the online help. If you are using an earlier version and these worked for you, then maybe they were hidden properties before that point. Hidden properties are generally not stable for production use, or they would have been exposed for public use. They may have been developing them at the time.
Wesley Crihfield
(Not an Autodesk Employee)
Can't find what you're looking for? Ask the community or share your knowledge.