Solid Edge Part Type Library
Add Method
Specifies the number of base faces to be included.
Specifies the array of the base faces.
Specifies the number of target faces to be included.
Specifies the array of the target faces.
Member of the LabelWeldData constant set that specifies the weld symbology for the weld.
Specifies the base thickness of the weld.
Specifies the target width of the weld.
Description
Adds a fillet weld feature.
Syntax
Visual Basic
Public Function Add( _
   ByVal NumberOfBaseFaces As Long, _
   ByRef BaseFaces() As Object, _
   ByVal NumberOfTargetFaces As Long, _
   ByRef TargetFaces() As Object, _
   ByVal LabelWeldDataObject As LabelWeldData, _
   ByVal FilletSetbackMethod As FilletWeldSetbackConstants, _
   ByVal FilletBaseWidthOrThickness As Double, _
   ByVal FilletTargetWidth As Double _
) As PartFilletWeld
Parameters
NumberOfBaseFaces
Specifies the number of base faces to be included.
BaseFaces
Specifies the array of the base faces.
NumberOfTargetFaces
Specifies the number of target faces to be included.
TargetFaces
Specifies the array of the target faces.
LabelWeldDataObject
Member of the LabelWeldData constant set that specifies the weld symbology for the weld.
FilletSetbackMethod
ValueDescription
seFilletWeldEqualSetbackFilletBaseWidth is used for both base and target side fillet widths.
seFilletWeldThicknessFilletBaseWidth is used as the length of the perpendicular segment from the heel of the fillet to its opposite side.
seFilletWeldUnequalSetbackBase and target side fillet widths can be different.
FilletBaseWidthOrThickness
Specifies the base thickness of the weld.
FilletTargetWidth
Specifies the target width of the weld.
Example
Imports System.IO
Imports System.Runtime.InteropServices

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim objFolder As DirectoryInfo
        Dim objFileInfo As FileInfo
        Dim objApp As SolidEdgeFramework.Application = Nothing
        Dim objPartDoc As SolidEdgePart.PartDocument = Nothing

        Dim FilletWelds As SolidEdgePart.PartFilletWelds = Nothing
        Dim FilletWeld As SolidEdgePart.PartFilletWeld = Nothing
        Dim objDocuments As SolidEdgeFramework.Documents = Nothing
        Dim iNumBaseFaces As Integer
        Dim iNumTargetFaces As Integer
        Dim dBaseThickness As Double
        Dim dTargetThickness As Double
        Dim eSetbackType As SolidEdgePart.FilletWeldSetbackConstants
        Dim objBaseFaces(0) As SolidEdgeGeometry.Face
        Dim objTargetFaces(0) As SolidEdgeGeometry.Face
        Dim objFaceArray(0) As SolidEdgeGeometry.Face
        Dim objExtProt1 As SolidEdgePart.ExtrudedProtrusion = Nothing
        Dim objExtProt2 As SolidEdgePart.ExtrudedProtrusion = Nothing
        Dim objFaces As SolidEdgeGeometry.Faces = Nothing
        Dim objFace As SolidEdgeGeometry.Face = Nothing

        Dim objModel As SolidEdgePart.Model   ' Object type will woork for both Flat model and Design model
        Dim LabelWeldDC As SolidEdgePart.LabelWeldDataCollection
        Dim LabelWeldObject As SolidEdgePart.LabelWeldData

        Try
            objFolder = GetTrainingFolder()
            objFileInfo = New FileInfo(Path.Combine(objFolder.FullName, "Pin1.par"))
            objApp = Marshal.GetActiveObject("SolidEdge.Application")

            'objApp = Activator.CreateInstance(Type.GetTypeFromProgID("SolidEdge.Application"))

            objApp.Visible = True
            objDocuments = objApp.Documents
            ' First open the test case document from training folder
            objPartDoc = objDocuments.Open(objFileInfo.FullName)

            ' Get model handle
            objModel = objPartDoc.Models.Item(1)

            'Get Label Weld Data object
            LabelWeldDC = objPartDoc.LabelWeldDataCollection
            LabelWeldObject = LabelWeldDC.Add(ZSymbol:=0, Tail:=0, DashLine:=0, WeldInField:=0, OffsetTopBottom:=0, WeldAllAround:=0, Symmetrical:=0, TopNote1:="Test1", TopNote2:="Test2", TopTreatmentType:=0, TopType:=0, TopNote3:="Test3", TopNoteZ:="", TailNote:="", BottomNote1:="", BottomNote2:="", BottomTreatmentType:=0, BottomType:=0, BottomNote3:="", BottomNoteZ:="", TopTypeCompound:=0, BottomTypeCompound:=0, CenterType:=0, CrossSectionArea:=0, TailNote2:="", TopNoteCSize:="", BottomNoteCSize:="", TopNoteAngle:="", BottomNoteAngle:="", TopNoteDepth:="", BottomNoteDepth:="", TopPosOffset:=0, BottomPosOffset:=0)

            'Get Fillet weld collection
            FilletWelds = objModel.PartFilletWelds

            ' Get Protrusion 1
            objExtProt1 = objModel.ExtrudedProtrusions.Item(1)

            ' Get all base faces collection
            objFaces = objExtProt1.Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll)

            ' Collect INPUT Base faces
            objBaseFaces(0) = objFaces.Item(1)

            'Get protrusion 2
            objExtProt2 = objModel.ExtrudedProtrusions.Item(2)

            ' Get all target faces collection
            objFaces = objExtProt2.Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll)

            ' Collect INPUT Target faces
            objTargetFaces(0) = objFaces.Item(7)

            'Apply face styles to selected faces for identification
            objBaseFaces(0).Style = objPartDoc.FaceStyles("red")
            objTargetFaces(0).Style = objPartDoc.FaceStyles("red")

            ' Initialize all inputs
            iNumBaseFaces = 1
            iNumTargetFaces = 1
            eSetbackType = SolidEdgePart.FilletWeldSetbackConstants.seFilletWeldThickness
            dBaseThickness = 0.00235
            dTargetThickness = 0.0025

            ' Add a  new Fillet weld
            FilletWeld = FilletWelds.Add(iNumBaseFaces,
                                         objTargetFaces,
                                         iNumTargetFaces,
                                         objBaseFaces,
                                         LabelWeldObject,
                                         eSetbackType,
                                         dBaseThickness,
                                         dTargetThickness)

        Catch ex As Exception
            MsgBox(ex.ToString)
        Finally

            If Not objPartDoc Is Nothing Then
                LabelWeldObject = Nothing
                LabelWeldDC = Nothing
                FilletWeld = Nothing
                FilletWelds = Nothing
                objPartDoc.Close()
                objPartDoc = Nothing
            End If

            objApp = Nothing
        End Try
    End Sub
    Function GetTrainingFolder() As DirectoryInfo
        Dim objInstallData As SEInstallDataLib.SEInstallData = Nothing
        Dim objInstallFolder As DirectoryInfo = Nothing
        Dim objTrainingFolder As DirectoryInfo = Nothing

        Try
            objInstallData = New SEInstallDataLib.SEInstallData
            objInstallFolder = New DirectoryInfo(objInstallData.GetInstalledPath())
            objTrainingFolder = New DirectoryInfo(Path.Combine(objInstallFolder.Parent.FullName, "Training"))
        Catch
        Finally
            If Not (objInstallData Is Nothing) Then
                Marshal.FinalReleaseComObject(objInstallData)
                objInstallData = Nothing
            End If
        End Try

        Return objTrainingFolder
    End Function
End Class
See Also

PartFilletWelds Collection  | PartFilletWelds Members