Solid Edge Draft Type Library
AddConnectedDimensionsToSelectSet Method
Description
Adds dimensions to select set which are connected to drawing view.
Syntax
Visual Basic
Public Sub AddConnectedDimensionsToSelectSet() 
Remarks
Function won’t clear the select set before adding the dimensions to it.
Example
Imports System.Runtime.InteropServices

Public Class AddConnectedDimensionstoSelectSet

    Private Sub btnAddConnectedDimensionstoSS_Click(sender As System.Object, e As System.EventArgs) Handles btnAddConnectedDimensionstoSS.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim ObjDraftDocument As SolidEdgeDraft.DraftDocument = Nothing
        Dim objSheet As SolidEdgeDraft.Sheet = Nothing
        Dim objDrawingViews As SolidEdgeDraft.DrawingViews = Nothing
        Dim objDrawingView As SolidEdgeDraft.DrawingView = Nothing
        Dim objType As Type = Nothing
        Dim selset As SolidEdgeFramework.SelectSet = Nothing
        Dim i As Integer

        Try
            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

            ObjDraftDocument = objApplication.ActiveDocument

            'getting the Active Sheet object
            objSheet = ObjDraftDocument.ActiveSheet

            objDrawingViews = objSheet.DrawingViews
            objDrawingView = objDrawingViews(0)

            'Add dimensions to select set which are connected to Drawing View.
            objDrawingView.AddConnectedDimensionsToSelectSet()
            selset = ObjDraftDocument.SelectSet
            i = selset.Count
            MsgBox(i.ToString)
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
See Also

DrawingView Object  | DrawingView Members