﻿using System.IO;
using System.Runtime.InteropServices;

internal static class Example
{
    [STAThread()]
    public static void Main()
    {
        SolidEdgeFramework.Application objApplication = null;
        SolidEdgeDraft.DraftDocument objDraftDocument = null;
        SolidEdgeDraft.Sheet objSheet = null;
        SolidEdgeDraft.DrawingViews objDrawingViews = null;
//        SolidEdgeDraft.DrawingView objDrawingView = null;
        double d = 0;

        try
        {
            OleMessageFilter.Register();

            objApplication = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
            objDraftDocument = objApplication.ActiveDocument;
            objSheet = objDraftDocument.ActiveSheet;
            objDrawingViews = objSheet.DrawingViews;

            foreach (SolidEdgeDraft.DrawingView objDrawingView in objDrawingViews)
            {
                objDrawingView.SetPerspectiveOn(10.0);
                objDrawingView.Update();
            }

        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message);
        }
        finally
        {
            OleMessageFilter.Revoke();
        }
    }
}