Solid Edge Draft Type Library
ConvertToIndependentDetailView Method
Solid Edge Draft Type Library > DrawingView Object : ConvertToIndependentDetailView Method
Description
Convert the current detail view to an independent detail view. Only applies to detail views.
Syntax
Visual Basic
Public Sub ConvertToIndependentDetailView() 
Example
Imports System
Imports System.Runtime.InteropServices

Namespace Examples
    Friend Class Program
        <STAThread>
        Shared Sub Main(ByVal args() As String)
            Dim application As SolidEdgeFramework.Application = Nothing
            Dim draftDocument As SolidEdgeDraft.DraftDocument = Nothing
            Dim sheet As SolidEdgeDraft.Sheet = Nothing
            Dim drawingViews As SolidEdgeDraft.DrawingViews = Nothing
            Dim drawingView As SolidEdgeDraft.DrawingView = Nothing

            Try
                ' See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic.
                OleMessageFilter.Register()

                ' Attempt to connect to a running instance of Solid Edge.
                application = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application)
                draftDocument = TryCast(application.ActiveDocument, SolidEdgeDraft.DraftDocument)

                If draftDocument IsNot Nothing Then
                    sheet = draftDocument.ActiveSheet
                    drawingViews = sheet.DrawingViews

                    For i As Integer = 1 To drawingViews.Count
                        drawingView = drawingViews.Item(i)

                        If drawingView.DrawingViewType = SolidEdgeDraft.DrawingViewTypeConstants.igDetailView Then
                            drawingView.ConvertToIndependentDetailView()
                        End If
                    Next i
                End If
            Catch ex As System.Exception
                Console.WriteLine(ex)
            Finally
                OleMessageFilter.Unregister()
            End Try
        End Sub
    End Class
End Namespace
using System;
using System.Runtime.InteropServices;

namespace Examples
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            SolidEdgeFramework.Application application = null;
            SolidEdgeDraft.DraftDocument draftDocument = null;
            SolidEdgeDraft.Sheet sheet = null;
            SolidEdgeDraft.DrawingViews drawingViews = null;
            SolidEdgeDraft.DrawingView drawingView = null;

            try
            {
                // See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic.
                OleMessageFilter.Register();

                // Attempt to connect to a running instance of Solid Edge.
                application = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
                draftDocument = application.ActiveDocument as SolidEdgeDraft.DraftDocument;

                if (draftDocument != null)
                {
                    sheet = draftDocument.ActiveSheet;
                    drawingViews = sheet.DrawingViews;

                    for (int i = 1; i <= drawingViews.Count; i++)
                    {
                        drawingView = drawingViews.Item(i);

                        if (drawingView.DrawingViewType == SolidEdgeDraft.DrawingViewTypeConstants.igDetailView)
                        {
                            drawingView.ConvertToIndependentDetailView();
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
            finally
            {
                OleMessageFilter.Unregister();
            }
        }
    }
}
See Also

DrawingView Object  | DrawingView Members  | Solid Edge V19 - What's New