Solid Edge Part Type Library
AddCopiedPart Method
Specifies the name of the part file to be copied.
Specifies a scale factor to be applied to the copied part in the x dimension.
Specifies a scale factor to be applied to the copied part in the y dimension.
Specifies a scale factor to be applied to the copied part in the z dimension.
Specifies a user-defined coordinate system for positioning the copied part.
Description
Creates a CopiedPart object.
Syntax
Visual Basic
Public Function AddCopiedPart( _
   ByVal FileName As String, _
   Optional ByVal XScale As Variant, _
   Optional ByVal YScale As Variant, _
   Optional ByVal ZScale As Variant, _
   Optional ByVal MirrorOrFlattenPlane As Variant, _
   Optional ByVal Flatten As Variant, _
   Optional ByVal FamilyOfPartsMember As Variant, _
   Optional ByVal CoordinateSystem As Variant _
) As Model
Parameters
FileName
Specifies the name of the part file to be copied.
XScale
Specifies a scale factor to be applied to the copied part in the x dimension.
YScale
Specifies a scale factor to be applied to the copied part in the y dimension.
ZScale
Specifies a scale factor to be applied to the copied part in the z dimension.
MirrorOrFlattenPlane
Flatten
FamilyOfPartsMember
CoordinateSystem
Specifies a user-defined coordinate system for positioning the copied part.
Remarks
This Add method fails if called more than one time because only one base feature (or Model) is valid in a Part File. To add additional PartCopy objects, use the Add method on CopyConstructions collection object.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objCPScaled As SolidEdgePart.Model
    Dim objCPMirrored As SolidEdgePart.Model
    Dim objCPFlatten As SolidEdgePart.Model
    Const TESTFILE = "T:\vbtests\testcases\CapEndRH.psm"
    ' Report errors
    Const PI = 3.14159265358979
    ' Create/get the application with specific settings
    On Error Resume Next
    Set objApp = GetObject(, "SolidEdge.Application")
    If Err Then
        Err.Clear
        Set objApp = CreateObject("SolidEdge.Application")
        Set objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    ' creating a scaled copy of the test case file
    Set objCPScaled = objDoc.Models.AddCopiedPart(Filename:=TESTFILE, Xscale:=0.75, Yscale:=0.5, Zscale:=0.25)


    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objCPScaled = Nothing
    Set objCPMirrored = Nothing
    Set objCPFlatten = Nothing
End Sub
See Also

Models Collection  | Models Members