Solid Edge FrameworkSupport Type Library
GetSegmentedStyle Method
Specifies the index of the segmented style to return.
Coordinates for the start of the segment.
Coordinates for the start of the segment.
Coordinates for the end of the segment.
Coordinates for the end of the segment.
LinearStyle object applied to the segment.
Description
Returns the start point, end point, and linear style applied to a specified segment of a 2-D geometry object.
Syntax
Visual Basic
Public Sub GetSegmentedStyle( _
   ByVal Index As Long, _
   ByRef x1 As Double, _
   ByRef y1 As Double, _
   ByRef x2 As Double, _
   ByRef y2 As Double, _
   ByRef Style As Object _
) 
Parameters
Index
Specifies the index of the segmented style to return.
x1
Coordinates for the start of the segment.
y1
Coordinates for the start of the segment.
x2
Coordinates for the end of the segment.
y2
Coordinates for the end of the segment.
Style
LinearStyle object applied to the segment.
Remarks
The segment is specified by its index value.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objarc2d As SolidEdgeFrameworkSupport.Arc2d
    Dim objStyle1 As SolidEdgeFrameWork.LinearStyle
    Dim objStyle2 As SolidEdgeFrameWork.LinearStyle
    Dim objStyle3 As SolidEdgeFrameWork.LinearStyle
    Dim objStyle4 As SolidEdgeFrameWork.LinearStyle
    Dim ObjSty1 As Object, ObjSty2 As Object, ObjSty3 As Object
    Dim ObjSty4 As Object
    Dim x1 As Double, x2 As Double, x3 As Double, x4 As Double
    Dim X5 As Double, x6 As Double, x7 As Double, x8 As Double
    Dim y1 As Double, y2 As Double, y3 As Double, y4 As Double
    Dim y5 As Double, y6 As Double, y7 As Double, y8 As Double
    ' 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
    'getting the Active Sheet object
    Set objSheet = objDoc.ActiveSheet
    'get linear style object
    Set objStyle1 = objDoc.LinearStyles(7)
    Set objStyle2 = objDoc.LinearStyles(6)
    Set objStyle3 = objDoc.LinearStyles(3)
    Set objStyle4 = objDoc.LinearStyles(4)
    'create Arc2d object
    Set objarc2d = objSheet.Arcs2d.AddByCenterStartEnd(xCenter:=0, _
                                                       yCenter:=0, xStart:=0.15, yStart:=0#, xEnd:=0#, yEnd:=0.15)
    ' add segment style to the arc2d objects
    Call objarc2d.AddSegmentedStyle(x1:=0.15, y1:=0#, x2:=0.14309, _
                                    y2:=0.045, Style:=objStyle1)
    Call objarc2d.AddSegmentedStyle(x1:=0.14309, y1:=0.045, x2:=0.10905, _
                                    y2:=0.103, Style:=objStyle2)
    Call objarc2d.AddSegmentedStyle(x1:=0.10905, y1:=0.103, x2:=0.06328, _
                                    y2:=0.136, Style:=objStyle3)
    Call objarc2d.AddSegmentedStyle(x1:=0.06328, y1:=0.136, x2:=0#, _
                                    y2:=0.15, Style:=objStyle4)
    'get the segment style applied to the arc2d objects
    Call objarc2d.GetSegmentedStyle(Index:=1, x1:=x1, y1:=y1, x2:=x2, _
                                    y2:=y2, Style:=ObjSty1)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objarc2d = Nothing
    Set objStyle1 = Nothing
    Set objStyle2 = Nothing
    Set objStyle3 = Nothing
    Set objStyle4 = Nothing
End Sub
See Also

Arc2d Object  | Arc2d Members

Send comments on this topic.