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 SolidEdgeAssembly.AssemblyDocument = Nothing
Dim objpaths As SolidEdgeAssembly.Paths = Nothing
Dim objpath As SolidEdgeAssembly.Path = Nothing
Dim aobj As Object = Nothing
Dim ConstraintDirection As SolidEdgePart.SEFixedLengthConstraintDirection = Nothing
Dim objConstrainedEdge As Object = Nothing
Dim doubleValue As Double
Try
objApp = Marshal.GetActiveObject("SolidEdge.Application")
objDoc = objApp.ActiveDocument ' Active document must contain a path
objpaths = objDoc.Paths
objpath = objpaths.Item(1)
objpath.SetFixedLength(1.0, SolidEdgePart.SEFixedLengthConstraintDirection.igConstraintDirectionNoAxis, aobj)
objpath.GetFixedLength(doubleValue, ConstraintDirection, objConstrainedEdge)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class