Solid Edge Part Type Library
SetConstraintType Method
Description
Set type for a constraint.
Syntax
Visual Basic
Public Sub SetConstraintType( _
   ByVal eConstraintType As FEAConstraintTypeEnum_Auto _
) 
Parameters
eConstraintType
ValueDescription
eCnstrTypeCylindrical_Auto 
eCnstrTypeFixed_Auto 
eCnstrTypeNone_Auto 
eCnstrTypeNoRotation_Auto 
eCnstrTypePinned_Auto 
eCnstrTypeSlidingAlongSurface_Auto 
eCnstrTypeUserDefined_Auto 
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPartDocument As SolidEdgePart.PartDocument = Nothing
        Dim objStudyOwner As SolidEdgePart.StudyOwner = Nothing
        Dim objStudy As SolidEdgePart.Study = Nothing
        Dim objConstraintOwner As SolidEdgePart.ConstraintOwner = Nothing
        Dim objConstraint As SolidEdgePart.FEAConstraint = Nothing
        Dim eConstraintType As SolidEdgePart.FEAConstraintTypeEnum_Auto = SolidEdgePart.FEAConstraintTypeEnum_Auto.eCnstrTypePinned_Auto

        Try
            OleMessageFilter.Register()

            ' Connect to Solid Edge
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objPartDocument = objApplication.ActiveDocument

            objStudyOwner = objPartDocument.StudyOwner
            objStudy = objStudyOwner.Item(1)
            objStudy.GetConstraintOwner(objConstraintOwner)
            objConstraint = objConstraintOwner.Item(1)

            eConstraintType = SolidEdgePart.FEAConstraintTypeEnum_Auto.eCnstrTypePinned_Auto
            objConstraint.SetConstraintType(eConstraintType)

        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

FEAConstraint Object  | FEAConstraint Members  | Solid Edge ST3 - What's New