Solid Edge FrameworkSupport Type Library
AddFix Method
Specifies the Relations2d collection object to which the igFixRelation is to be added.
If set, checking is performed to ensure that the relationship does not contradict previously placed relationships.
Description
Adds a fix relationship to a Relations2d collection.
Syntax
Visual Basic
Public Function AddFix( _
   ByVal Object As Object, _
   Optional ByVal guaranteed_ok As Variant _
) As Relation2d
Parameters
Object
Specifies the Relations2d collection object to which the igFixRelation is to be added.
guaranteed_ok
If set, checking is performed to ensure that the relationship does not contradict previously placed relationships.
Remarks
The method fixes the specified graphic object to the sheet so that no move operation can be performed on the object. Relationship Add methods have checks to ensure that a new relationship does not contradict previously placed relationships. For example, AddHorizontal will return an error if the line already has a vertical relationship. This check can be turned off to enhance performance. The optional “guaranteed_ok” argument, if set to 1, bypasses relationship checking. However, this feature could leave the system in an unsolvable state, so use it with extreme caution. It is best to use this feature only on a new element with no other relationships.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeframework.Application
    Dim objDoc As Solidedgedraft.DraftDocument
    Dim objCirc1 As SolidEdgeframeworksupport.Circle2d
    Dim objRelns As SolidEdgeframeworksupport.Relations2d
    Dim objReln1 As SolidEdgeframeworksupport.Relation2d
    Dim objSheet As Solidedgedraft.Sheet
    ' Report errors
    Const PI = 3.14159265358979
    ' Create/get the application with specific settings
    On Error Resume Next
    Set objApp = GetObject(, "SolidEdge.Application")
    If Err Then
        Err.Clear
        Set objApp = CreateObject("SolidEdge.Application")
        Set objDoc = objApp.Documents.Add("SolidEdge.DraftDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    ' Get the active sheet
    Set objSheet = objDoc.ActiveSheet
    ' Create a Circle object
    Set objCirc1 = objSheet.Circles2d.AddByCenterRadius(x:=0.25, y:=0.25, Radius:=0.1)
    ' Create a Fix Relation between the objects
    Set objRelns = objSheet.Relations2d
    Set objReln1 = objRelns.AddFix(Object:=objCirc1)

    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objCirc1 = Nothing
    Set objRelns = Nothing
    Set objSheet = Nothing
    Set objReln1 = Nothing
End Sub
See Also

Relations2d Collection  | Relations2d Members