Solid Edge Part Type Library
AddEx Method
Number of profiles on which the cutout is to be constructed.
Array of profiles on which the cutout is to be constructed.
Specifies the depth of the feature, as measured from the profile to either the inside or outside of the drawn cutout feature, as determined by DimensionType.
Member of the DrawnCutoutFeatureConstants constant set, seDrawnCutProfileLeft or seDrawnCutProfileRight. Specifies the side of the profile where the drawn cutout is created.
Member of the DrawnCutoutFeatureConstants constant set, seDrawnCutDepthLeft or seDrawnCutDepthRight. Specifies the side of the profile plane to which depth is added.
Member of the DrawnCutoutFeatureConstants constant set, seDrawnCutMaterialInside or seDrawnCutMaterialOutside. Specifies the side of the profile to which material thickness is added when forming the drawn cutout.
If Round Corners is set to seDrawnCutRoundCorners, you must specify the radius of the optional die-side round GUI users can specify in the Options dialog.
Specifies the angular dimension of the optional taper angle GUI users can specify in the Options dialog. Default is 0.0.
If RoundCorners is set to seDrawnCutRoundCorners, you must specify the round to apply to closed corners in the profile.
Member of the DrawnCutoutFeatureConstants constant set, seDrawnCutRoundEdges (default) or seDrawnCutNoRoundEdges. Specifies whether or not to apply the die-side round to the edges of the formed feature.
Member of the DrawnCutoutFeatureConstants constant set, seDrawnCutNoRoundCorners (default) or seDrawnCutRoundCorners. Specifies whether or not to fillet closed corners in the profile.
Description
This method can create "DrawnCutOut" using multiple profiles.
Syntax
Visual Basic
Public Function AddEx( _
   ByVal NumberOfProfiles As Long, _
   ByRef ProfileArray() As Object, _
   ByVal Depth As Double, _
   ByVal ProfileSide As DrawnCutoutFeatureConstants, _
   ByVal DepthSide As DrawnCutoutFeatureConstants, _
   ByVal MaterialSide As DrawnCutoutFeatureConstants, _
   Optional ByVal DieRadius As Variant, _
   Optional ByVal TaperAngle As Variant, _
   Optional ByVal ProfileCornerRadius As Variant, _
   Optional ByVal RoundEdges As Variant, _
   Optional ByVal RoundCorners As Variant _
) As DrawnCutout
Parameters
NumberOfProfiles
Number of profiles on which the cutout is to be constructed.
ProfileArray
Array of profiles on which the cutout is to be constructed.
Depth
Specifies the depth of the feature, as measured from the profile to either the inside or outside of the drawn cutout feature, as determined by DimensionType.
ProfileSide
ValueDescription
seDrawnCutoutDepthLeft
seDrawnCutoutDepthRight
seDrawnCutoutMaterialInside
seDrawnCutoutMaterialOutside
seDrawnCutoutNoRoundCorners
seDrawnCutoutNoRoundEdges
seDrawnCutoutProfileLeft
seDrawnCutoutProfileRight
seDrawnCutoutRoundCorners
seDrawnCutoutRoundEdges
Member of the DrawnCutoutFeatureConstants constant set, seDrawnCutProfileLeft or seDrawnCutProfileRight. Specifies the side of the profile where the drawn cutout is created.
DepthSide
ValueDescription
seDrawnCutoutDepthLeft
seDrawnCutoutDepthRight
seDrawnCutoutMaterialInside
seDrawnCutoutMaterialOutside
seDrawnCutoutNoRoundCorners
seDrawnCutoutNoRoundEdges
seDrawnCutoutProfileLeft
seDrawnCutoutProfileRight
seDrawnCutoutRoundCorners
seDrawnCutoutRoundEdges
Member of the DrawnCutoutFeatureConstants constant set, seDrawnCutDepthLeft or seDrawnCutDepthRight. Specifies the side of the profile plane to which depth is added.
MaterialSide
ValueDescription
seDrawnCutoutDepthLeft
seDrawnCutoutDepthRight
seDrawnCutoutMaterialInside
seDrawnCutoutMaterialOutside
seDrawnCutoutNoRoundCorners
seDrawnCutoutNoRoundEdges
seDrawnCutoutProfileLeft
seDrawnCutoutProfileRight
seDrawnCutoutRoundCorners
seDrawnCutoutRoundEdges
Member of the DrawnCutoutFeatureConstants constant set, seDrawnCutMaterialInside or seDrawnCutMaterialOutside. Specifies the side of the profile to which material thickness is added when forming the drawn cutout.
DieRadius
If Round Corners is set to seDrawnCutRoundCorners, you must specify the radius of the optional die-side round GUI users can specify in the Options dialog.
TaperAngle
Specifies the angular dimension of the optional taper angle GUI users can specify in the Options dialog. Default is 0.0.
ProfileCornerRadius
If RoundCorners is set to seDrawnCutRoundCorners, you must specify the round to apply to closed corners in the profile.
RoundEdges
Member of the DrawnCutoutFeatureConstants constant set, seDrawnCutRoundEdges (default) or seDrawnCutNoRoundEdges. Specifies whether or not to apply the die-side round to the edges of the formed feature.
RoundCorners
Member of the DrawnCutoutFeatureConstants constant set, seDrawnCutNoRoundCorners (default) or seDrawnCutRoundCorners. Specifies whether or not to fillet closed corners in the profile.
Example
Imports System.Runtime.InteropServices

Public Class CutOut
    Private Sub btnCutOut_Click(sender As System.Object, e As System.EventArgs)
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPartDoc As SolidEdgePart.PartDocument = Nothing
        Dim objDrawnCut As SolidEdgePart.DrawnCutout = Nothing
        Dim objDrawnCuts As SolidEdgePart.DrawnCutouts = 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 the reference to the open document
            objPartDoc = objApplication.ActiveDocument

            ' Get the models collection
            objModels = objPartDoc.Models()

            objModel = objModels.Item(1)

            objDrawnCuts = objModel.DrawnCutouts
            If objDrawnCuts Is Nothing Then
                MessageBox.Show("Failed to get 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
            objDrawnCut = objDrawnCuts.AddEx(
            1,
            objProfArr,
            0.05,
            SolidEdgePart.DrawnCutoutFeatureConstants.seDrawnCutoutProfileLeft,
            SolidEdgePart.DrawnCutoutFeatureConstants.seDrawnCutoutDepthRight,
            SolidEdgePart.DrawnCutoutFeatureConstants.seDrawnCutoutMaterialOutside,
            0.002,
            0.0,
            0.001,
            SolidEdgePart.DrawnCutoutFeatureConstants.seDrawnCutoutRoundEdges,
            SolidEdgePart.DrawnCutoutFeatureConstants.seDrawnCutoutRoundCorners)

            If objDrawnCut Is Nothing Then
                MessageBox.Show("Failed to Add object")
            End If
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try

    End Sub
End Class
See Also

DrawnCutouts Collection  | DrawnCutouts Members