Solid Edge FrameworkSupport Type Library
Add Method
Specifies the x coordinate of the pattern's origin.
Specifies the y coordinate of the pattern's origin.
Specifies the width of the pattern.
Specifies the height of the pattern.
Specifies the angle of the pattern.
Specifies the type of offset to be applied to the pattern. Valid values are members of the PatternOffsetTypeConstants constant set.
Specifies the number of pattern members along the x axis.
Specifies the number of pattern members along the y axis.
Specifies the distance between adjacent rows in the pattern, measured along the x axis of the pattern rectangle.
Specifies the distance between adjacent rows in the pattern, measured along the y axis of the pattern rectangle.
Specifies the type of stagger to be applied to the pattern. Valid values are members of the StaggerTypeConstants constant set.
Specifies the row or column stagger distance.
Specifies whether or not the row or column stagger distance is to be half the X Offset or Y Offset value.
Specifies whether or not to include the last staggered column in the pattern.
Description
Adds an occurrence of the referenced object.
Syntax
Visual Basic
Public Function Add( _
   ByVal OriginX As Double, _
   ByVal OriginY As Double, _
   ByVal Width As Double, _
   ByVal Height As Double, _
   ByVal Angle As Double, _
   ByVal OffsetType As PatternOffsetTypeConstants, _
   ByVal XCount As Long, _
   ByVal YCount As Long, _
   ByVal XSpace As Double, _
   ByVal YSpace As Double, _
   Optional ByVal StaggerType As Variant, _
   Optional ByVal StaggerOffset As Variant, _
   Optional ByVal StaggerOffsetHalf As Variant, _
   Optional ByVal StaggerIncludeLast As Variant _
) As RectangularPattern2d
Parameters
OriginX
Specifies the x coordinate of the pattern's origin.
OriginY
Specifies the y coordinate of the pattern's origin.
Width
Specifies the width of the pattern.
Height
Specifies the height of the pattern.
Angle
Specifies the angle of the pattern.
OffsetType
ValueDescription
sePatternFillOffsetFill Offset
sePatternFitOffsetFit Offset
sePatternFixedOffsetFixed Offset
Specifies the type of offset to be applied to the pattern. Valid values are members of the PatternOffsetTypeConstants constant set.
XCount
Specifies the number of pattern members along the x axis.
YCount
Specifies the number of pattern members along the y axis.
XSpace
Specifies the distance between adjacent rows in the pattern, measured along the x axis of the pattern rectangle.
YSpace
Specifies the distance between adjacent rows in the pattern, measured along the y axis of the pattern rectangle.
StaggerType
Specifies the type of stagger to be applied to the pattern. Valid values are members of the StaggerTypeConstants constant set.
StaggerOffset
Specifies the row or column stagger distance.
StaggerOffsetHalf
Specifies whether or not the row or column stagger distance is to be half the X Offset or Y Offset value.
StaggerIncludeLast
Specifies whether or not to include the last staggered column in the pattern.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objProfile As SolidEdgePart.Profile
    Dim objRPatterns As SolidEdgeFrameworkSupport.RectangularPatterns2d
    Dim objRPattern As SolidEdgeFrameworkSupport.RectangularPattern2d
    ' 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
    ' *** Create a RectangularPatterns2d collection object
    ' Create a new profile object
    Set objProfile = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(1))
    ' Get the RectangularPatterns2d object on the Profile
    Set objRPatterns = objProfile.RectangularPatterns2d
    ' Add an item to the RectangularPatterns2d collection
    Set objRPattern = objRPatterns.Add(OriginX:=0, OriginY:=0, Width:=0.1, Height:=0.05, _
                                       Angle:=0, OffsetType:=sePatternFillOffset, XCount:=6, YCount:=4, _
                                       XSpace:=0.015, YSpace:=0.01)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objProfile = Nothing
    Set objRPatterns = Nothing
    Set objRPattern = Nothing
End Sub
See Also

RectangularPatterns2d Collection  | RectangularPatterns2d Members

Send comments on this topic.