Referenced At: itself as dimensioned object Object Definition: ComponentOccurrencesEnumerator While its complete functionality is still not quite understood by me, this object acts as a container to catch a collection of Component Occurrences, and disseminate them by type into an intelligent object with appropriate functions. ![]() This object goes hand in hand with the next function. What follows is more functionality when you want to be specific about what you are getting. This is a great way to quickly run through the Assembly and get every component. MessageBox.Show(oOccName, "Document Name") In this example, I used a For Each function to pull each component.Įxample: ' Iterate through all of the Part Occurrencesįor Each oOccurrence In oAsmCompDef.Occurrences Now we can declare a ‘ComponentOccurence’ object, and use it to inspect each ‘ComponentOccurrence’ that exists in our ‘Assembl圜omponentDefinition’. The Occurrences collection is the whole enchilada of Component Occurrences, which you can access directly. Referenced at: Assembl圜omponentDefinition.Occurences The benefit here is that skeleton and reference files are not part of the ‘Assembly Component Definition’ structure, so they don’t get in the way here.īase Object Class: Assembl圜omponentDefinition If a part definition occurs 10 times in an assembly, there are 10 Component Occurrences, and all 10 will show up in this container. Component OccurrencesĪs you might expect, these are the containers that each component document is present in. Now that the Assembly Component Definition is filled, it is time to do some digging. OAsmCompDef = oAsmDoc.ComponentDefinition ![]() We need to declare an ‘Assembl圜omponentDefinition’ object, and assign it with data from a call to the Assembly Document’s ‘ComponentDefinition’ function.ĭim oAsmCompDef As Assembl圜omponentDefinition Returned By: AssemblyDocument.ComponentDefinition FunctionĪccess to the Assembly component structure is performed through this object. Object Definition: Assembl圜omponentDefinition The complete component container similar to the CAD Bill of Materials (BOM), except that the actual BOM definition data is contained separately inside this structure. ![]() This section will discuss using these, and the functionality associated with extracting each portion. I am dividing into parts so that it is (hopefully) easier to digest.Īssembly Component Occurrences are all components in an assembly, which contain Occurrences, or each component. This is what cleaned up my code tremendously. We will look briefly at raw document references in this article, and then take a bit of time stepping into the Assembly Document container hierarchy in a follow up.įor the scope of this discussion, I will limit that object hierarchy as follows:ĭocument -> AssemblyDocument -> Assembl圜omponentDefinition -> ComponentOccurences -> ComponentOccurenceĬomponentOccurancesEnumerator Assembly Components
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |