Solid Edge Part Type Library
Add Method
Specify number of faces as integer.
An array of the faces that will be collectively flattened for the blank feature.  These faces must be connected.
X coordinate for draw direction. The draw direction is the direction in which the input faces are to be flattened.
Y coordinate for draw direction. The draw direction is the direction in which the input faces are to be flattened.
Z coordinate for draw direction. The draw direction is the direction in which the input faces are to be flattened.
The desired thickness of the flattened blank body.
One of the formability factors, a material specific constant used in computing the flatten operation.
One of the formability factors, a material specific constant used in computing the flatten operation.
A value from 1 to 10 that determines the accuracy used (and the time taken) in computing the Blank feature.
A distance, between 0 and the thickness value, that the faces will be offset before the flatten operation.
 If set, this option will remove interior loops of the input faces selected.
Description
Adds Blank feature
Syntax
Visual Basic
Public Function Add( _
   ByVal nNumFaces As Integer, _
   ByRef FaceArray() As Object, _
   ByVal DrawDirectionX As Double, _
   ByVal DrawDirectionY As Double, _
   ByVal DrawDirectionZ As Double, _
   ByVal Thickness As Double, _
   ByVal HardeningCoefficient As Double, _
   ByVal StrengthCoefficient As Double, _
   ByVal AccuracyFactor As Integer, _
   ByVal offsetDistance As Double, _
   ByVal RemoveLoops As Boolean _
) As Blank
Parameters
nNumFaces
Specify number of faces as integer.
FaceArray
An array of the faces that will be collectively flattened for the blank feature.  These faces must be connected.
DrawDirectionX
X coordinate for draw direction. The draw direction is the direction in which the input faces are to be flattened.
DrawDirectionY
Y coordinate for draw direction. The draw direction is the direction in which the input faces are to be flattened.
DrawDirectionZ
Z coordinate for draw direction. The draw direction is the direction in which the input faces are to be flattened.
Thickness
The desired thickness of the flattened blank body.
HardeningCoefficient
One of the formability factors, a material specific constant used in computing the flatten operation.
StrengthCoefficient
One of the formability factors, a material specific constant used in computing the flatten operation.
AccuracyFactor
A value from 1 to 10 that determines the accuracy used (and the time taken) in computing the Blank feature.
offsetDistance
A distance, between 0 and the thickness value, that the faces will be offset before the flatten operation.
RemoveLoops
 If set, this option will remove interior loops of the input faces selected.
Remarks
This method generates a uniform thickness flat body on the XY plane, given a set of connected faces, a thickness value, a draw direction, formability factors, accuracy factor, an offset value and a material.
The flattened Blank feature is added in the flatten environment in a Part or Sheet Metal document.  A material must be defined for the document before the Blank is created.
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 objSEApplication As SolidEdgeFramework.Application = Nothing
        Dim objProfileSets As SolidEdgePart.ProfileSet = Nothing
        Dim objDoc As SolidEdgePart.PartDocument = Nothing

        Dim objFlatPatternModels As SolidEdgePart.FlatPatternModels = Nothing
        Dim objFlatPatternModel As SolidEdgePart.FlatPatternModel = Nothing
        Dim objFlatPattern As SolidEdgePart.FlatPattern = Nothing
        Dim objModels As SolidEdgePart.Models = Nothing
        Dim objModel As SolidEdgePart.Model = Nothing
        Dim objBlank As SolidEdgePart.Blank = Nothing
        Dim objBlanks As SolidEdgePart.Blanks = Nothing
        Dim FacesToFlatten(0 To 5) As Object
        Dim FacesToSet(0 To 5) As Object
        Dim FacesFromFlat(0 To 5) As Object

        Dim objBaseModel As SolidEdgePart.Model = Nothing
        Dim objBox As SolidEdgePart.BoxFeature = Nothing
        Dim objBoxes As SolidEdgePart.BoxFeatures = Nothing
        Dim objMatTable As SolidEdgeFramework.MatTable = Nothing
        Dim strLibrary As String = "Materials"
        Dim strMaterial As String = "Copper"

        Try
            ' Get Solid Edge Application object...
            objSEApplication = Marshal.GetActiveObject("SolidEdge.Application")

            'Add part document
            objDoc = objSEApplication.Documents.Add("SolidEdge.PartDocument")

            ' Get material table object handle
            objMatTable = objSEApplication.GetMaterialTable()

            ' Set active document handle
            objMatTable.SetActiveDocument(objDoc)
            objMatTable.ApplyMaterialToDoc(objDoc, strMaterial, strLibrary)


            'Change Modeling mode to Synchronous
            objDoc.ModelingMode = SolidEdgePart.ModelingModeConstants.seModelingModeSynchronous
            objModels = objDoc.Models
            'Create a box
            objBaseModel = objModels.AddBoxByCenter(0.0, 0.0, 0.0, 0.01, 0.01, 0.0, 0.01, objDoc.RefPlanes.Item(3), SolidEdgePart.FeaturePropertyConstants.igLeft, False, Nothing, 0)

            'Get the boxes collection
            objBoxes = objModels.Item(1).BoxFeatures
            objFlatPatternModels = objDoc.FlatPatternModels

            Call objFlatPatternModels.Add(objDoc.Models.Item(1))

            objFlatPatternModel = objFlatPatternModels.Item(1)

            ' test make active
            Call objFlatPatternModel.MakeActive()

            ' Define faces to flatten - from the box feature in this case      
            objBox = objFlatPatternModel.Features.Item(1)
            FacesToFlatten(0) = objBox.Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane).Item(1)
            FacesToFlatten(1) = objBox.Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane).Item(2)
            FacesToFlatten(2) = objBox.Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane).Item(3)


            objBlank = objFlatPatternModel.Blanks.Add(nNumFaces:=3, _
                                                FaceArray:=FacesToFlatten, _
                                                DrawDirectionX:=0.0#, _
                                                DrawDirectionY:=1.0#, _
                                                DrawDirectionZ:=0.0#, _
                                                Thickness:=0.002, _
                                                HardeningCoefficient:=0.2, _
                                                StrengthCoefficient:=550000000, _
                                                AccuracyFactor:=3, _
                                                offsetDistance:=0.0#, _
                                                RemoveLoops:=False)
            MsgBox("Thickness of blank is " & objBlank.Thickness.ToString)
            MsgBox("Accuracy Factor of blank is " & objBlank.AccuracyFactor.ToString)
            MsgBox("Offset Distance of blank is " & objBlank.offsetDistance.ToString)
            MsgBox("Hardening Coefficient of blank is " & objBlank.HardeningCoefficient.ToString)
            MsgBox("Strength Coefficient of blank is " & objBlank.StrengthCoefficient.ToString)
            MsgBox("Remove Loops Option of blank is set to " & objBlank.RemoveLoopsOption.ToString)

        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try

    End Sub
End Class
See Also

Blanks Collection  | Blanks Members