ComponentOccurrences Object
Derived from:
ComponentOccurrencesEnumerator Object
Description
Provides access to the objects within an assembly and supports methods to create new occurrences.
Methods
Add |
Method that creates a new for an existing part or subassembly. This method is the equivalent of the 'Place Component' command. |
AddByComponentDefinition |
Method that creates a new for a new part or subassembly. This method is the equivalent of the 'Create Component' command. |
AddCustomiPartMember |
Method that creates an of an iPartMember in this AssemblyComponentDefinition. The iPartMember is specified by a custom factory and a row in the factory. |
AddiAssemblyMember |
Method that creates an occurrence of an iAssemblyMember in an assembly. The iAssemblyMember is specified by a factory and a row in the factory. |
AddiPartMember |
Method that creates an of an iPartMember in this AssemblyComponentDefinition. The iPartMember is specified by a factory and a row in the factory. |
AddUsingiMates |
Method that adds a new occurrence into the assembly. This method is the equivalent of using the Place Component command with the "Use iMate" check box checked. The method returns a failure if no matches are found. |
AddVirtual |
Method that creates a virtual component definition and adds an occurrence based on that definition. |
AddWithOptions |
Method that creates a new occurrence for an existing part or subassembly. This method is the equivalent of the "Place Component" command. |
Properties
AllLeafOccurrences |
Return all unique leaf occurrences (optionally filtered to the specified definition) relative to this context. |
AllReferencedOccurrences |
Property that returns all occurrences that reference the input object. |
Count |
Property that returns the number of items in this collection. |
Item |
Allows integer-indexed access to objects in the collection. |
ItemByName |
Allows string-indexed access to items in the collection. (Usually found when this ability has been added to a pre-existing collection). |
Type |
Returns an ObjectTypeEnum indicating this object's type. |
Accessed From
AssemblyComponentDefinition.Occurrences,
ComponentDefinition.Occurrences,
FlatPattern.Occurrences,
PartComponentDefinition.Occurrences,
SheetMetalComponentDefinition.Occurrences,
VirtualComponentDefinition.Occurrences,
WeldmentComponentDefinition.Occurrences,
WeldsComponentDefinition.Occurrences
Samples
Adding iAssembly occurrences |
This sample demonstrates adding iAssembly occurrences to an assembly. |
Adding iPart occurrences to an assembly |
This sample demonstrates adding iPart occurrences to an assembly. |
Assembly Add Occurrence |
This sample demonstrates placing an assembly occurrence. |
iMate Creation During Occurrence Placement |
This sample demonstrates creating multiple iMate results when adding an occurrence into an assembly. This uses the AddUsingiMate method which is the equivalent of using the Place Component command and checking the Use iMate check box on the dialog. |
SurfaceBody Copy |
This sample demonstrates copying a surface body from one part to another. This is equivalent to the Promote command, but the API is much more flexible. In order for the sample to be self-contained, it creates two parts on the fly that will be used to demonstrate copying a body from one part to another. When copying a body into a part, you provide the surface body and a matrix to define its position in the new part. This sample creates a matrix based on the position of these parts within an assembly. |
Create assembly occurrence with representations |
This sample demonstrates how to create an assembly occurrence by specifying various representations. |
Version
Introduced in version 4