Solid Edge Part Type Library
SetFrameDefineOriginAndOrientation Method
Point to define the default frame origin.
Line segment in the sketch.
Description
Define the default origin point for frame cross sections
Syntax
Visual Basic
Public Sub SetFrameDefineOriginAndOrientation( _
   ByVal pOrientationLine As Object, _
   ByVal pOriginPoint As Object _
) 
Parameters
pOrientationLine
Point to define the default frame origin.
pOriginPoint
Line segment in the sketch.
Example
Public Class Frame_Define_Origin_and_Orientation

    Private Sub FrameDefineOriginAndOrientation_Click(sender As System.Object, e As System.EventArgs) Handles FrameDefineOriginAndOrientation.Click
        Dim objPartDoc As SolidEdgePart.PartDocument = Nothing
        Dim objProfile As SolidEdgePart.Profile = Nothing
        Dim sketch As SolidEdgePart.Sketch = Nothing
        Dim objPoint As SolidEdgeFrameworkSupport.Point2d = Nothing
        Dim objOrientation As SolidEdgeFrameworkSupport.Line2d = Nothing
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPointOut As SolidEdgeFrameworkSupport.Point2d = Nothing
        Dim objOrientationOut As SolidEdgeFrameworkSupport.Line2d = Nothing

        Try
            ' Create/get the application with specific settings 
            objApplication = GetObject(, "SolidEdge.Application")

            'Open the Document mentioned in the Doc Files.
            ' OR User can create a part file having a sketch
            objPartDoc = objApplication.Documents.Open("C:\FrameDefineOriginInSketch.par")

            If objPartDoc Is Nothing Then
                MsgBox("Could not open document ")
            End If

            ' Input Edges
            sketch = objPartDoc.Sketches.Item(1)
            objProfile = sketch.Profile

            'Get Input Edge
            objOrientation = objProfile.Lines2d.Item(3)
            'Get Input Point
            objPoint = objProfile.Points2d.Item(1)
            'Set Frame Define Origin And Orientation
            objPartDoc.SetFrameDefineOriginAndOrientation(objOrientation, objPoint)
            'Get Frame Define Origin And Orientation
            objPartDoc.GetFrameDefineOriginAndOrientation(objOrientationOut, objPointOut)
            'Delete Frame Define Origin And Orientation
            objPartDoc.DeleteFrameDefineOriginAndOrientation()
            objOrientationOut = Nothing
            objPointOut = Nothing
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub


End Class
See Also

PartDocument Object  | PartDocument Members