Adds the specified component for the specified configuration options to this assembly.
.NET Syntax
Visual Basic (Usage) | |
---|
Dim instance As IAssemblyDoc
Dim CompName As String
Dim ConfigOption As Integer
Dim NewConfigName As String
Dim UseConfigForPartReferences As Boolean
Dim ExistingConfigName As String
Dim X As Double
Dim Y As Double
Dim Z As Double
Dim value As Component2
value = instance.AddComponent5(CompName, ConfigOption, NewConfigName, UseConfigForPartReferences, ExistingConfigName, X, Y, Z)
|
Parameters
- CompName
- Path name of a pre-loaded part or assembly to add as a component (see Remarks)
- ConfigOption
Mode in which to open the document as specified in swAddComponentConfigOptions_e
- NewConfigName
- Name for the new assembly configuration; valid only if ConfigOption = swAddComponentConfigOptions_e.swAddComponentConfigOptions_NewConfigWithAllReferenceModels or swAddComponentConfigOptions_e.swAddComponentConfigOptions_NewConfigWithAsmStructure
- UseConfigForPartReferences
- If true, the configuration specified in ExistingConfigName is used
- ExistingConfigName
Name of the configuration of the loaded component; valid only if UseConfigForPartReferences = true
- X
- X coordinate of the component center
- Y
- Y coordinate of the component center
- Z
- Z coordinate of the component center
Return Value
IComponent2
Example
Remarks
See Also
Availability
SolidWorks 2010 FCS, Revision Number 18.0