Solid Edge Part Type Library
Convert2DCoordinate Method
Specifies the x coordinate of the 2-D point to be converted.
Specifies the y coordinate of the 2-D point to be converted.
Returns the x coordinate of the 3-D point.
Returns the y coordinate of the 3-D point.
Returns the z coordinate of the 3-D point.
Description
Converts a 2-D point from the profile plane to a 3-D position.
Syntax
Visual Basic
Public Sub Convert2DCoordinate( _
   ByVal x2d As Double, _
   ByVal y2d As Double, _
   ByRef x3d As Double, _
   ByRef y3d As Double, _
   ByRef z3d As Double _
) 
Parameters
x2d
Specifies the x coordinate of the 2-D point to be converted.
y2d
Specifies the y coordinate of the 2-D point to be converted.
x3d
Returns the x coordinate of the 3-D point.
y3d
Returns the y coordinate of the 3-D point.
z3d
Returns the z coordinate of the 3-D point.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objProfile As SolidEdgePart.Profile
    Dim objPlane As SolidEdgePart.RefPlane
    Dim x As Double
    Dim y As Double
    Dim z As Double
    Dim sDumpStatus As String    ' Used for temporary storage of datadump return string
    ' 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.PartDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    ' Create a Profile
    Set objPlane = objDoc.RefPlanes.AddParallelByDistance(ParentPlane:=objDoc.RefPlanes(1), _
                                                          Distance:=0.05, NormalSide:=igRight)
    Set objProfile = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objPlane)
    ' Calling the Convert2DCoordinate method to convert 2d point to 3d Coordinate
    Call objProfile.Convert2DCoordinate(x2d:=1, y2d:=1, x3d:=x, y3d:=y, z3d:=z)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objProfile = Nothing
End Sub
See Also

Profile Object  | Profile Members

Send comments on this topic.