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 objSheet As SolidEdgeDraft.Sheet = Nothing
Dim objline As SolidEdgeFrameworkSupport.Line2d = Nothing
Dim objDim As SolidEdgeFrameworkSupport.Dimension = Nothing
Dim objDims As SolidEdgeFrameworkSupport.Dimensions = Nothing
Dim x, y, xx, yx, zx, xz, yz, z, zz As Double
Dim DimData As SolidEdgeFrameworkSupport.DisplayData = Nothing
Dim str1 As String = ""
Dim i, j, count As Integer
' Create/get the application with specific settings
Try
objApp = Marshal.GetActiveObject("SolidEdge.Application")
'objApp = CreateObject("SolidEdge.Application")
'Open a document having dimensions in it
objDoc = objApp.ActiveDocument
objApp.Visible = True
'getting the Active Sheet object
objSheet = objDoc.ActiveSheet
objDims = objSheet.Dimensions
For j = 1 To objDims.Count
objDim = objDims.Item(j)
DimData = objDim.GetDisplayData()
count = DimData.GetTextCount
For i = 0 To count - 1
DimData.GetTextAtIndex(i, str1, x, y, z, xx, yx, zx, xz, yz, zz)
MsgBox(xx.ToString + " " + yx.ToString + " " + zx.ToString)
Next
Next
Catch ex As Exception
MsgBox(ex.ToString)
Finally
End Try
End Sub
End Class