Solid Edge FrameworkSupport Type Library
AddByTwoPoints Method
Specifies the coordinates of the lower left corner of the text box. The z1 argument applies only to 3-D objects.
Specifies the coordinates of the lower left corner of the text box. The z1 argument applies only to 3-D objects.
Specifies the coordinates of the lower left corner of the text box. The z1 argument applies only to 3-D objects.
Specifies the coordinates of the upper right corner of the text box. The z2 argument applies only to 3-D objects.
Specifies the coordinates of the upper right corner of the text box. The z2 argument applies only to 3-D objects.
Specifies the coordinates of the upper right corner of the text box. The z2 argument applies only to 3-D objects.
Description
Creates a text box by specifying the diagonal points of the text box.
Syntax
Visual Basic
Public Function AddByTwoPoints( _
   ByVal x1 As Double, _
   ByVal y1 As Double, _
   ByVal z1 As Double, _
   ByVal x2 As Double, _
   ByVal y2 As Double, _
   ByVal z2 As Double _
) As TextBox
Parameters
x1
Specifies the coordinates of the lower left corner of the text box. The z1 argument applies only to 3-D objects.
y1
Specifies the coordinates of the lower left corner of the text box. The z1 argument applies only to 3-D objects.
z1
Specifies the coordinates of the lower left corner of the text box. The z1 argument applies only to 3-D objects.
x2
Specifies the coordinates of the upper right corner of the text box. The z2 argument applies only to 3-D objects.
y2
Specifies the coordinates of the upper right corner of the text box. The z2 argument applies only to 3-D objects.
z2
Specifies the coordinates of the upper right corner of the text box. The z2 argument applies only to 3-D objects.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objTxtboxs As SolidEdgeFrameworkSupport.TextBoxes
    Dim objTxtbox As SolidEdgeFrameworkSupport.TextBox
    Dim objTxtbox1 As SolidEdgeFrameworkSupport.TextBox
    ' 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 object
    Set objSheet = objDoc.ActiveSheet
    'get the Textboxs collection
    Set objTxtboxs = objSheet.TextBoxes
    'create the textbox by AddByTwoPoints method
    Set objTxtbox = objTxtboxs.AddByTwoPoints(x1:=0.1, y1:=0.1, z1:=0, _
                                              x2:=0.2, y2:=0.2, z2:=0)
    objTxtbox.Text = "Test box"
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objTxtboxs = Nothing
    Set objTxtbox = Nothing
    Set objTxtbox1 = Nothing
End Sub
See Also

TextBoxes Collection  | TextBoxes Members