Solid Edge Draft Type Library
SetCenterForDetailView Method
Solid Edge Draft Type Library > DrawingView Object : SetCenterForDetailView Method
Specify X coordinate as double
Specify Y coordinate as double
Description
Sets the center point for detail view at given position
Syntax
Visual Basic
Public Sub SetCenterForDetailView( _
   ByVal x As Double, _
   ByVal y As Double _
) 
Parameters
x
Specify X coordinate as double
y
Specify Y coordinate as double
Example
Imports System.Runtime.InteropServices

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objDraftDocument As SolidEdgeDraft.DraftDocument
        Dim objSheet As SolidEdgeDraft.Sheet = Nothing
        Dim objSheets As SolidEdgeDraft.SectionSheets = Nothing
        Dim objDrawingViews As SolidEdgeDraft.DrawingViews = Nothing
        Dim objDrawingView As SolidEdgeDraft.DrawingView = Nothing
        Dim objSections As SolidEdgeDraft.Sections = Nothing
        Dim objWkngSect As SolidEdgeDraft.Section = Nothing
        Dim dblX As Double = 0.0
        Dim dblY As Double = 0.0
        Try
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objDraftDocument = objApplication.ActiveDocument
            objSections = objDraftDocument.Sections
            objWkngSect = objSections.WorkingSection
            objSheets = objWkngSect.Sheets
            objSheet = objSheets.Item(1)

            objDrawingViews = objSheet.DrawingViews
            'Here use appropriate view number 
            objDrawingView = objDrawingViews.Item(3)
            objDrawingView.GetCenterForDetailView(dblX, dblY)
            objDrawingView.SetCenterForDetailView(1.5, 1.5)
        Catch ex As Exception
            MsgBox(ex.ToString)
        Finally

        End Try

    End Sub
End Class
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;

public class Form1
{

    private void Button1_Click(object sender, EventArgs e)
    {
        SolidEdgeFramework.Application objApplication = null;
        SolidEdgeDraft.DraftDocument objDraftDocument = null;
        SolidEdgeDraft.Sheet objSheet = null;
        SolidEdgeDraft.SectionSheets objSheets = null;
        SolidEdgeDraft.DrawingViews objDrawingViews = null;
        SolidEdgeDraft.DrawingView objDrawingView = null;
        SolidEdgeDraft.Sections objSections = null;
        SolidEdgeDraft.Section objWkngSect = null;
        double dblX = 0.0;
        double dblY = 0.0;
        try
        {
            objApplication = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
            objDraftDocument = objApplication.ActiveDocument;
            objSections = objDraftDocument.Sections;
            objWkngSect = objSections.WorkingSection;
            objSheets = objWkngSect.Sheets;
            objSheet = objSheets.Item(1);

            objDrawingViews = objSheet.DrawingViews;
            //Here use appropriate view number 
            objDrawingView = objDrawingViews.Item(3);
            objDrawingView.GetCenterForDetailView(dblX, dblY);
            objDrawingView.SetCenterForDetailView(1.5, 1.5);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
        finally
        {

        }

    }
}
See Also

DrawingView Object  | DrawingView Members