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