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 TextStyle
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 objTxtStyles As SolidEdgeFramework.TextStyles
        Dim objTxtStyle As SolidEdgeFramework.TextStyle
        
        Try

            objApp = Marshal.GetActiveObject("SolidEdge.Application")
            objDoc = objApp.ActiveDocument
            'Get the TextStyles object
            objTxtStyles = objDoc.TextStyles
            'Add new TextStyles to the collection
            objTxtStyle = objTxtStyles.Add("TextStyle1", "Normal")
            

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

TextStyles Collection  | TextStyles Members