Solid Edge FrameworkSupport Type Library
SetCenterPoint Method
New X-Coordinate
New Y-Coordinate
New Z-Coordinate
Description
Relocates the center point of the specified object.
Syntax
Visual Basic
Public Sub SetCenterPoint( _
   ByVal x As Double, _
   ByVal y As Double, _
   ByVal z As Double _
) 
Parameters
x
New X-Coordinate
y
New Y-Coordinate
z
New Z-Coordinate
Example
Imports System.Runtime.InteropServices

Public Class ChangeCenterPoint

    Private Sub btnChangeCenterPoint_Click(sender As System.Object, e As System.EventArgs) Handles btnChangeCenterPoint.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objDraftDoc As SolidEdgeDraft.DraftDocument = Nothing
        Dim objSheet As SolidEdgeDraft.Sheet = Nothing
        Dim objCenterLines As SolidEdgeFrameworkSupport.CenterLines = Nothing
        Dim objCenterLine As SolidEdgeFrameworkSupport.CenterLine = 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

            objDraftDoc = objApplication.ActiveDocument

            'getting the Active Sheet object
            objSheet = objDraftDoc.ActiveSheet

            ' Get the CenterLines object on the active sheet
            objCenterLines = objSheet.CenterLines

            ' Draw a Center arc on the active sheet
            objCenterLine = objCenterLines.AddCenterArc(Nothing, 0.05, 0.02, 0.0#, False, Nothing, 0.1, 0.04, 0.0#, False, Nothing, 0.2, 0.03, 0.0#, False, False)

            ' Set the Center Point
            Call objCenterLine.SetCenterPoint(x:=0.15, y:=0.03, z:=0)

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

CenterLine Object  | CenterLine Members