Solid Edge Draft Type Library
AddByUserSelection Method
SavedSettings like ANSI, ISO, DIN etc.
Use 1 if you want auto balloon else use 0.
Description
Block table will be created with blocks in active select set.
Syntax
Visual Basic
Public Function AddByUserSelection( _
   ByVal SavedSettings As String, _
   ByVal AutoBalloon As Long _
) As BlockTable
Parameters
SavedSettings
SavedSettings like ANSI, ISO, DIN etc.
AutoBalloon
Use 1 if you want auto balloon else use 0.
Example
Imports System.Runtime.InteropServices

Public Class AddByUserSelection

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objDraftDoc As SolidEdgeDraft.DraftDocument = Nothing
        Dim DrawingView As SolidEdgeDraft.DrawingView = Nothing
        Dim DrawingViews As SolidEdgeDraft.DrawingViews = Nothing
        Dim BlockTables As SolidEdgeDraft.BlockTables = Nothing
        Dim BlockTable As SolidEdgeDraft.BlockTable = Nothing
        Dim Balloons As SolidEdgeFrameworkSupport.Balloons = Nothing
        Dim objType As Type = Nothing

        Try
            ' Create/get the application with specific settings
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")

            If objApplication Is Nothing Then
                ' Get the type from the Solid Edge ProgID
                objType = Type.GetTypeFromProgID("SolidEdge.Application")
                ' Start Solid Edge
                objApplication = Activator.CreateInstance(objType)
                ' Make Solid Edge visible
                objApplication.Visible = True
            End If
            'Get reference to active document
            objDraftDoc = objApplication.ActiveDocument
            DrawingViews = objDraftDoc.ActiveSheet.DrawingViews
            BlockTables = objDraftDoc.BlockTables
            Balloons = objDraftDoc.ActiveSheet.Balloons

            'Add Method- By User Selection
            BlockTable = BlockTables.AddByUserSelection("ISO", 1)

            'Update Method
            For Each BlockTable In BlockTables
                BlockTable.Update()
            Next

            'Delete method
            For Each BlockTable In BlockTables
                BlockTable.Delete()
            Next

            'Add Method (only table )
            BlockTable = BlockTables.AddByUserSelection("ISO", 0)

        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
See Also

BlockTables Collection  | BlockTables Members