Solid Edge Part Type Library
Add Method
Number of Edge path for the creation of Ruled Surface.
Array of edges on which ruled surface will be created.
This is reference element.Plane will be input when user wants to create Tapered to plane type ruled surface.and axis will be input when user wants to create a ruled surface along an axis.
Magnitude of ruled surface.
Angle of ruled surface.
Type of ruled surface.
Direction of ruled surface.
Side of ruled surface.
Description
Add Ruled Surface
Syntax
Visual Basic
Public Function Add( _
   ByVal NumberofEntities As Long, _
   ByRef pEdgesForRuledSurface() As Object, _
   ByVal pPlaneOrAxis As Object, _
   ByVal dRulMagnitude As Double, _
   ByVal dRulAngle As Double, _
   ByVal eRulType As RuledSurfaceTypeConstants, _
   ByVal eRulDirection As RuledSurfaceDirectionConstants, _
   ByVal eRulSide As RuledSurfaceSideConstants _
) As Object
Parameters
NumberofEntities
Number of Edge path for the creation of Ruled Surface.
pEdgesForRuledSurface
Array of edges on which ruled surface will be created.
pPlaneOrAxis
This is reference element.Plane will be input when user wants to create Tapered to plane type ruled surface.and axis will be input when user wants to create a ruled surface along an axis.
dRulMagnitude
Magnitude of ruled surface.
dRulAngle
Angle of ruled surface.
eRulType
ValueDescription
igRuledAlongAnAxisAlong an axis
igRuledNaturalNatural
igRuledNormalToPlaneNormal to plane
igRuledTangentContinuousTangent Continuous
igRuledTaperedToPlaneTapered to plane
Type of ruled surface.
eRulDirection
ValueDescription
igRuledSurfaceleftRuled Surface Left direction
igRuledSurfacRightRuled Surface Right direction
Direction of ruled surface.
eRulSide
ValueDescription
igRuledSurfaceInsideRuled Surface inside
igRuledSurfaceOutsideRuled Surface outside
Side of ruled surface.
Example
Imports System.Runtime.InteropServices
Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPartDoc As SolidEdgePart.PartDocument = Nothing
        Dim objEdges As SolidEdgeGeometry.Edges
        Dim objRuledSurfaces As SolidEdgePart.RuledSurfaces
        Dim objRuledSurface As SolidEdgePart.RuledSurface
        Dim objConstructions As SolidEdgePart.Constructions
        Dim objEdgArr As System.Array
        Dim objType As Type = Nothing
        Dim strRetStatusMsg As String
        strRetStatusMsg = ""

        Try
            'The following sample code assumes that SolidEdge application is running and part document is active with one square block in it.
            'This sample code will create Ruled Surface with one Edges as input.
            'If you want to create ruled surface for more than one edge they need to be tangentially connected.

            ' Create/get the application with specific settings
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")

            If objApplication Is Nothing Then
                ' Get the type from the Solid Edge ProgID
                objType = Type.GetTypeFromProgID("SolidEdge.Application")
                ' Start Solid Edge
                objApplication = Activator.CreateInstance(objType)
                ' Make Solid Edge visible
                objApplication.Visible = True
            End If
            'Get reference to active document
            objPartDoc = objApplication.ActiveDocument()

            'obtain the first model and get all its edges
            objEdges = objPartDoc.Models.Item(1).ExtrudedProtrusions.Item(1).Edges(SolidEdgeConstants.FeatureTopologyQueryTypeConstants.igQueryAll)
            If Err().Number <> 0 Or objEdges Is Nothing Then
                strRetStatusMsg = "Could not open document "
            End If

            objEdgArr = Array.CreateInstance(GetType(Object), 1)
            objEdgArr(0) = objEdges.Item(1)

            'obtain constrction object
            objConstructions = objPartDoc.Constructions
            If Err().Number <> 0 Or objConstructions Is Nothing Then
                strRetStatusMsg = "Could not open document "
            End If

            objRuledSurfaces = objConstructions.RuledSurfaces

            'now create Ruled Surface
            objRuledSurface = objConstructions.RuledSurfaces.Add(1,
                                objEdgArr,
                                objEdges.Item(2),
                                0.1,
                                10.0, SolidEdgeConstants.RuledSurfaceTypeConstants.igRuledAlongAnAxis,
                                SolidEdgeConstants.RuledSurfaceDirectionConstants.igRuledSurfaceleft,
                                SolidEdgeConstants.RuledSurfaceSideConstants.igRuledSurfaceOutside)

            'Edit ruled Surface

            'Change distance
            objRuledSurface.RuledSurfaceDistance = 0.2

            'Change angle
            objRuledSurface.RuledSurfaceDistance = 11

            'Change Rul surface type 
            objRuledSurface.RuledSurfaceType = SolidEdgeConstants.RuledSurfaceTypeConstants.igRuledNatural

            'Change Rul surface Direction 
            objRuledSurface.RuledSurfaceDirection = SolidEdgeConstants.RuledSurfaceDirectionConstants.igRuledSurfacRight
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try

    End Sub
End Class
See Also

RuledSurfaces Collection  | RuledSurfaces Members