Showing results for 
Search instead for 
Did you mean: 

Add flange

Valued Contributor
Valued Contributor

Hello, sorry all but I am desesperate.


This is my code, now I'm trying to load a flie that is only a tab. I am trying to make the flange but the problem is the same.

The flange in created but with problems, unsuccesfully.


Tihs is my code. Please somebody knows how to create a flange? Can someboy help me, please?


Thanks and sorry if disturb.


Imports SolidEdgeConstants

Imports System.Runtime.InteropServices

Module Module1

    Sub Main()

        Dim objApplication As SolidEdgeFramework.Application = Nothing

        Dim objDocuments As SolidEdgeFramework.Documents = Nothing

        Dim objSheetM As SolidEdgePart.SheetMetalDocument = Nothing

        Dim objModels As SolidEdgePart.Models = Nothing

        Dim objModel As SolidEdgePart.Model = Nothing

        Dim objPliegues As SolidEdgePart.Flanges = Nothing

        Dim objPliegue As SolidEdgePart.Flange = Nothing

        Dim objcaraplegados As SolidEdgePart.Tabs = Nothing

        Dim objcaraplegado As SolidEdgePart.Tab = Nothing

        Dim objLineaPlegados As SolidEdgeGeometry.Edges = Nothing

        Dim objLineaPlegado As SolidEdgeGeometry.Edge = Nothing



            objApplication = Marshal.GetActiveObject("SolidEdge.Application") 'conecta con SE

            objDocuments = objApplication.Documents 'referencia a documentos

            objSheetM = objDocuments.Open("d:\sheetmetal2.psm")

            objModels = objSheetM.Models

            objModel = objModels.Item(1)



            objcaraplegados = objModel.Tabs

            objcaraplegado = objcaraplegados.Item(1)


            objLineaPlegados = objcaraplegado.Edges(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll)

            objLineaPlegado = objLineaPlegados.Item(5)


            objPliegues = objModel.Flanges

            objPliegue = objPliegues.Add(objLineaPlegado, SolidEdgePart.FeaturePropertyConstants.igLeft, 0.02)

            objPliegue.BendRadius = 0.005

            objPliegue.FlangeMaterialSide = SolidEdgePart.FlangeFeatureConstants.seFlangeMaterialOutside


        Catch ex As Exception



            If Not (objModel Is Nothing) Then


                objModel = Nothing

            End If

            If Not (objModels Is Nothing) Then


                objModels = Nothing

            End If

            If Not (objSheetM Is Nothing) Then


                objSheetM = Nothing

            End If

            If Not (objDocuments Is Nothing) Then


                objDocuments = Nothing

            End If

            If Not (objApplication Is Nothing) Then


                objApplication = Nothing

            End If

            If Not (objPliegues Is Nothing) Then


                objPliegues = Nothing

            End If

            If Not (objPliegue Is Nothing) Then


                objPliegue = Nothing

            End If

        End Try

    End Sub

End Module



Posted by: Javier C
Post date: 10/29/2011 6:42:43 AM


Add flange

Valued Contributor
Valued Contributor

You need to specify an offset value for the flange.


    objPliegues = objModel.Flanges
    objPliegue = objPliegues.Add(objLineaPlegado, SolidEdgePart.FeaturePropertyConstants.igLeft,.02)
    objPliegue.BendRadius = 0.005
    objPliegue.FlangeMaterialSide = SolidEdgePart.FlangeFeatureConstants.seFlangeMaterialOutside
    objPliegue.OffsetType = SolidEdgePart.FeaturePropertyConstants.igNone


Posted by: Daniel Sheets
Post date: 10/23/2012 7:20:08 AM