Solid Edge Draft Type Library
CenterOfMassBlockName Property
Description
Gets or sets the block used for center of mass. Use empty string to clear this property.
Property type
Read-write property
Syntax
Visual Basic
Public Property CenterOfMassBlockName As String
Example
Imports System.Runtime.InteropServices
Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim objApp As SolidEdgeFramework.Application = Nothing
        Dim objDoc As SolidEdgeDraft.DraftDocument = Nothing
        Dim objFilePrefs As SolidEdgeDraft.DraftFilePreferences = Nothing
        Dim objCOMBlockName As String
        Dim objCSBlockName As String
        Try
            objApp = Marshal.GetActiveObject("SolidEdge.Application")
            objDoc = objApp.ActiveDocument()
            objFilePrefs = objDoc.FilePreferences()

            objCOMBlockName = objFilePrefs.CenterOfMassBlockName()
            objCSBlockName = objFilePrefs.CoordinateSystemBlockName()

            objFilePrefs.CenterOfMassBlockName() = "Center of Mass"
            objFilePrefs.CoordinateSystemBlockName() = "Coordinate System"
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
See Also

DraftFilePreferences Object  | DraftFilePreferences Members