Solid Edge Framework Type Library
Add Method
Specifies the name for the new style.
Specifies the name of an existing style on which the new style is to be based.
Description
Adds an occurrence of the referenced object.
Syntax
Visual Basic
Public Function Add( _
   ByVal Name As String, _
   ByVal Parent As String _
) As HatchPatternStyle
Parameters
Name
Specifies the name for the new style.
Parent
Specifies the name of an existing style on which the new style is to be based.
Example
Imports System.Runtime.InteropServices

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim objApp As SolidEdgeFramework.Application
        Dim objDoc As SolidEdgeDraft.DraftDocument
        Dim objHPStyles As SolidEdgeFramework.HatchPatternStyles
        Dim objHPStyle As SolidEdgeFramework.HatchPatternStyle
        
        Try

            objApp = Marshal.GetActiveObject("SolidEdge.Application")
            objDoc = objApp.ActiveDocument
            
            'Get the HatchPatternStyles object
            objHPStyles = objDoc.HatchPatternStyles
            'Add new HatchPatternStyle to the collection
            objHPStyle = objHPStyles.Add("HatchPatternStyle1", "Honeycomb")
            

            ' USER DISPLAY
            ' Release objects
            objApp = Nothing
            objDoc = Nothing
            objHPStyles = Nothing
            objHPStyle = Nothing
   
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
See Also

HatchPatternStyles Collection  | HatchPatternStyles Members