Solid Edge Part Type Library
SetConstraintOptions Method
Constraint Type
Constraint Direction
X Direction
Y Direction
Z Direction
X Direction
Y Direction
Z Direction
Color of the symbols
Symbol spacing factor
Symbol size factor
Steering wheel length
Constraint properties
Symbol spacing factor
Constraint symbol size
Description
Set various options parameters like constraint type, properties, symbol size/spacing etc.
Syntax
Visual Basic
Public Sub SetConstraintOptions( _
   ByVal eConstraintType As FEAConstraintTypeEnum_Auto, _
   ByVal eConstraintDir As LoadSymbDirOptsEnum_Auto, _
   ByVal x As Double, _
   ByVal y As Double, _
   ByVal z As Double, _
   ByVal xx As Double, _
   ByVal yy As Double, _
   ByVal zz As Double, _
   ByVal colorConstraintSymbol As ULong, _
   ByVal dSpacingFactor As Double, _
   ByVal dSizeFactor As Double, _
   ByVal dSteeringWheelLen As Double, _
   ByVal dwConstraintProps As ULong, _
   ByVal dwConstraintSymSpacing As Double, _
   ByVal dConstraintSymSize As Double _
) 
Parameters
eConstraintType
ValueDescription
eCnstrTypeCylindrical_Auto 
eCnstrTypeFixed_Auto 
eCnstrTypeNone_Auto 
eCnstrTypeNoRotation_Auto 
eCnstrTypePinned_Auto 
eCnstrTypeSlidingAlongSurface_Auto 
eCnstrTypeUserDefined_Auto 
Constraint Type
eConstraintDir
ValueDescription
eLoadDirAboutAxis_Auto 
eLoadDirAlongVec_Auto 
eLoadDirCentrifugal_Auto 
eLoadDirComponents_Auto 
eLoadDirDefault_Auto 
eLoadDirForCnstr_Auto 
eLoadDirGravity_Auto 
eLoadDirHeatFlux_Auto 
eLoadDirNormalToFace_Auto 
eLoadDirTorque_Auto 
Constraint Direction
x
X Direction
y
Y Direction
z
Z Direction
xx
X Direction
yy
Y Direction
zz
Z Direction
colorConstraintSymbol
Color of the symbols
dSpacingFactor
Symbol spacing factor
dSizeFactor
Symbol size factor
dSteeringWheelLen
Steering wheel length
dwConstraintProps
Constraint properties
dwConstraintSymSpacing
Symbol spacing factor
dConstraintSymSize
Constraint symbol size
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 eConstraintDirection As SolidEdgePart.LoadSymbDirOptsEnum_Auto = SolidEdgePart.LoadSymbDirOptsEnum_Auto.eLoadDirForCnstr_Auto
        Dim eConstraintType As SolidEdgePart.FEAConstraintTypeEnum_Auto = SolidEdgePart.FEAConstraintTypeEnum_Auto.eCnstrTypePinned_Auto
        Dim dConstraintDirX As Double = 1.0
        Dim dConstraintDirY As Double = 0.0
        Dim dConstraintDirZ As Double = 0.0
        Dim dConstraintPosX As Double = -0.0853057546724518
        Dim dConstraintPosY As Double = 0.0
        Dim dConstraintPosZ As Double = 0.039781012722987466
        Dim dSpacingFactor As Double = 0.11
        Dim dSizeFactor As Double = 0.24200000000000002
        Dim dSteeringWheelLen As Double = 0.0
        Dim dwConstraintProps As UInt32 = 0
        Dim ColorConstraintSymbol As UInt32 = 16752704
        Dim dConstraintSymSpacing As Double = 0.014476064557417175
        Dim dConstraintSymSize As Double = 0.031847342026317789

        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)

            eConstraintDirection = SolidEdgePart.LoadSymbDirOptsEnum_Auto.eLoadDirForCnstr_Auto
            eConstraintType = SolidEdgePart.FEAConstraintTypeEnum_Auto.eCnstrTypePinned_Auto

            objConstraint.SetConstraintOptions(eConstraintType, _
                                               eConstraintDirection, _
                                               dConstraintDirX, _
                                               dConstraintDirY, _
                                               dConstraintDirZ, _
                                               dConstraintPosX, _
                                               dConstraintPosY, _
                                               dConstraintPosZ, _
                                               ColorConstraintSymbol, _
                                               dSpacingFactor, _
                                               dSizeFactor, _
                                               dSteeringWheelLen, _
                                               dwConstraintProps, _
                                               dConstraintSymSpacing, _
                                               dConstraintSymSize)

        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