Solid Edge Part Type Library
AddEx Method
Array of profiles to be used to construct the dimple.
Specifies the depth of the dimple.
Member of the DimpleFeatureConstants constant set that specifies to which side of the profile the dimple is to be constructed.
Member of the DimpleFeatureConstants constant set that specifies to which side of the sheet metal surface the dimple is to be constructed.
Specifies the punch radius of the dimple.
Specifies the die radius of the dimple.
Specifies in radians the taper angle of the dimple.
Member of the DimpleFeatureConstants constant set that specifies whether the dimple is to be constructed with the material inside or outside the profile.
Specifies the radius of the corners.
Member of the DimpleFeatureConstants constant set that specifies the type of dimension (inside or outside) to be applied to the dimple.
Member of the DimpleFeatureConstants that specifies whether or not the edges of the dimple are to be rounded.
Member of the DimpleFeatureConstants that specifies whether or not the corners of the dimple are to be rounded.
Description
This method can create "Dimple" feature using multiple profiles.
Syntax
Visual Basic
Public Function AddEx( _
   ByVal NumberOfProfiles As Long, _
   ByRef ProfileArray() As Object, _
   ByVal Depth As Double, _
   ByVal ProfileSide As DimpleFeatureConstants, _
   ByVal DepthSide As DimpleFeatureConstants, _
   Optional ByVal PunchRadius As Variant, _
   Optional ByVal DieRadius As Variant, _
   Optional ByVal TaperAngle As Variant, _
   Optional ByVal MaterialSide As Variant, _
   Optional ByVal ProfileCornerRadius As Variant, _
   Optional ByVal DimensionType As Variant, _
   Optional ByVal Round As Variant, _
   Optional ByVal RoundCorners As Variant _
) As Dimple
Parameters
NumberOfProfiles
ProfileArray
Array of profiles to be used to construct the dimple.
Depth
Specifies the depth of the dimple.
ProfileSide
ValueDescription
seDimpleDepthLeft
seDimpleDepthRight
seDimpleDimensionFull
seDimpleDimensionOffset
seDimpleMaterialInside
seDimpleMaterialOutside
seDimpleNoRoundCorners
seDimpleNoRoundEdges
seDimpleProfileLeft
seDimpleProfileRight
seDimpleRoundCorners
seDimpleRoundEdges
Member of the DimpleFeatureConstants constant set that specifies to which side of the profile the dimple is to be constructed.
DepthSide
ValueDescription
seDimpleDepthLeft
seDimpleDepthRight
seDimpleDimensionFull
seDimpleDimensionOffset
seDimpleMaterialInside
seDimpleMaterialOutside
seDimpleNoRoundCorners
seDimpleNoRoundEdges
seDimpleProfileLeft
seDimpleProfileRight
seDimpleRoundCorners
seDimpleRoundEdges
Member of the DimpleFeatureConstants constant set that specifies to which side of the sheet metal surface the dimple is to be constructed.
PunchRadius
Specifies the punch radius of the dimple.
DieRadius
Specifies the die radius of the dimple.
TaperAngle
Specifies in radians the taper angle of the dimple.
MaterialSide
Member of the DimpleFeatureConstants constant set that specifies whether the dimple is to be constructed with the material inside or outside the profile.
ProfileCornerRadius
Specifies the radius of the corners.
DimensionType
Member of the DimpleFeatureConstants constant set that specifies the type of dimension (inside or outside) to be applied to the dimple.
Round
Member of the DimpleFeatureConstants that specifies whether or not the edges of the dimple are to be rounded.
RoundCorners
Member of the DimpleFeatureConstants that specifies whether or not the corners of the dimple are to be rounded.
Example
Imports System.Runtime.InteropServices

Public Class Dimple

    Private Sub btnDimple_Click(sender As System.Object, e As System.EventArgs)
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPartDoc As SolidEdgePart.PartDocument = Nothing
        Dim objDimple As SolidEdgePart.Dimple = Nothing
        Dim objDimples As SolidEdgePart.Dimples = Nothing
        Dim objModels As SolidEdgePart.Models = Nothing
        Dim objModel As SolidEdgePart.Model = Nothing
        Dim objProfile As Object
        Dim objProfArr(0 To 1) As Object
        Dim objLines As Object
        Dim lngStatus As Long
        Dim objRelns As Object
        Dim nCnt As Object
        Dim objType As Type = Nothing

        Try
            ' Create/get the application with specific settings
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")

            If objApplication Is Nothing Then
                ' Get the type from the Solid Edge ProgID
                objType = Type.GetTypeFromProgID("SolidEdge.Application")
                ' Start Solid Edge
                objApplication = Activator.CreateInstance(objType)
                ' Make Solid Edge visible
                objApplication.Visible = True
            End If

            ' Get open document having simple extruded model with sketches drawn on it
            objPartDoc = objApplication.ActiveDocument

            ' get the models collection
            objModels = objPartDoc.Models()
            objModel = objModels.Item(1)
            objDimples = objModel.Dimples
            If objDimples Is Nothing Then
                MessageBox.Show("Failed to get the Dimples collection")
            End If

            objProfile = objPartDoc.ProfileSets.Add.Profiles.Add(objPartDoc.RefPlanes.Item(3))

            objLines = objProfile.Lines2d
            Call objLines.AddBy2Points(X1:=-0.08, Y1:=-0.05, X2:=0.06, Y2:=-0.05)
            Call objLines.AddBy2Points(X1:=0.06, Y1:=-0.05, X2:=0.06, Y2:=0.04)
            Call objLines.AddBy2Points(X1:=0.06, Y1:=0.04, X2:=-0.08, Y2:=0.04)
            Call objLines.AddBy2Points(X1:=-0.08, Y1:=0.04, X2:=-0.08, Y2:=-0.05)

            Call objLines.AddBy2Points(X1:=-0.5, Y1:=-0.07, X2:=-0.3, Y2:=-0.07)
            Call objLines.AddBy2Points(X1:=-0.5, Y1:=-0.07, X2:=-0.5, Y2:=0.07)
            Call objLines.AddBy2Points(X1:=-0.5, Y1:=0.07, X2:=-0.3, Y2:=0.07)
            Call objLines.AddBy2Points(X1:=-0.3, Y1:=0.07, X2:=-0.3, Y2:=-0.07)

            objRelns = objProfile.Relations2d
            Call objRelns.AddKeypoint(Object1:=objLines.Item(1), Index1:=SolidEdgeConstants.KeypointIndexConstants.igLineEnd, Object2:=objLines.Item(2), Index2:=SolidEdgeConstants.KeypointIndexConstants.igLineStart)
            Call objRelns.AddKeypoint(Object1:=objLines.Item(2), Index1:=SolidEdgeConstants.KeypointIndexConstants.igLineEnd, Object2:=objLines.Item(3), Index2:=SolidEdgeConstants.KeypointIndexConstants.igLineStart)
            Call objRelns.AddKeypoint(Object1:=objLines.Item(3), Index1:=SolidEdgeConstants.KeypointIndexConstants.igLineEnd, Object2:=objLines.Item(4), Index2:=SolidEdgeConstants.KeypointIndexConstants.igLineStart)
            Call objRelns.AddKeypoint(Object1:=objLines.Item(4), Index1:=SolidEdgeConstants.KeypointIndexConstants.igLineEnd, Object2:=objLines.Item(1), Index2:=SolidEdgeConstants.KeypointIndexConstants.igLineStart)

            Call objRelns.AddKeypoint(Object1:=objLines.Item(5), Index1:=SolidEdgeConstants.KeypointIndexConstants.igLineEnd, Object2:=objLines.Item(6), Index2:=SolidEdgeConstants.KeypointIndexConstants.igLineStart)
            Call objRelns.AddKeypoint(Object1:=objLines.Item(6), Index1:=SolidEdgeConstants.KeypointIndexConstants.igLineEnd, Object2:=objLines.Item(7), Index2:=SolidEdgeConstants.KeypointIndexConstants.igLineStart)
            Call objRelns.AddKeypoint(Object1:=objLines.Item(7), Index1:=SolidEdgeConstants.KeypointIndexConstants.igLineEnd, Object2:=objLines.Item(8), Index2:=SolidEdgeConstants.KeypointIndexConstants.igLineStart)
            Call objRelns.AddKeypoint(Object1:=objLines.Item(8), Index1:=SolidEdgeConstants.KeypointIndexConstants.igLineEnd, Object2:=objLines.Item(5), Index2:=SolidEdgeConstants.KeypointIndexConstants.igLineStart)

            lngStatus = objProfile.End(ValidationCriteria:=SolidEdgeConstants.ProfileValidationType.igProfileNoSelfIntersect)
            If lngStatus <> 0 Then
                MessageBox.Show("Profile not closed")
            End If

            nCnt = objPartDoc.ProfileSets.Count()

            'get profiles from profile set
            objProfArr(0) = objPartDoc.ProfileSets.Item(2).Profiles.Item(1)

            ' Create Dimple object
            objDimple = objDimples.AddEx(
            1,
            objProfArr,
            0.15,
            SolidEdgePart.DimpleFeatureConstants.seDimpleProfileLeft,
            SolidEdgePart.DimpleFeatureConstants.seDimpleDepthRight,
            0.001,
            0.002,
            0.0,
            SolidEdgePart.DimpleFeatureConstants.seDimpleMaterialOutside,
            0.001,
            SolidEdgePart.DimpleFeatureConstants.seDimpleDimensionFull,
            SolidEdgePart.DimpleFeatureConstants.seDimpleRoundEdges,
            SolidEdgePart.DimpleFeatureConstants.seDimpleRoundCorners)

            If objDimple Is Nothing Then
                MessageBox.Show("Failed to Add Dimple object")
            End If
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
See Also

Dimples Collection  | Dimples Members