Solid Edge FrameworkSupport Type Library
Add Method
Specifies the x coordinate for the new object.
Specifies the y coordinate for the new object.
Specifies the z coordinate for the new object.
Description
Adds an occurrence of the referenced object.
Syntax
Visual Basic
Public Function Add( _
   ByVal x1 As Double, _
   ByVal y1 As Double, _
   ByVal z1 As Double _
) As TextBox
Parameters
x1
Specifies the x coordinate for the new object.
y1
Specifies the y coordinate for the new object.
z1
Specifies the z coordinate for the new object.
Example
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace Examples
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            SolidEdgeFramework.Application application = null;
            SolidEdgeFramework.Documents documents = null;
            SolidEdgeDraft.DraftDocument draftDocument = null;
            SolidEdgeDraft.Sheet sheet = null;
            SolidEdgeFrameworkSupport.TextBoxes textBoxes = null;
            SolidEdgeFrameworkSupport.TextBox textBox = null;

            try
            {
                // See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic.
                OleMessageFilter.Register();

                // Attempt to connect to a running instance of Solid Edge.
                application = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
                documents = application.Documents;
                draftDocument = (SolidEdgeDraft.DraftDocument)documents.Add("SolidEdge.DraftDocument");
                sheet = draftDocument.ActiveSheet;
                textBoxes = (SolidEdgeFrameworkSupport.TextBoxes)sheet.TextBoxes;

                textBox = textBoxes.Add(0.1, 0.2, 0);
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
            finally
            {
                OleMessageFilter.Unregister();
            }
        }
    }
}
private var @void Main(string[] args) { SolidEdgeFramework.Application application == @null;
using (System;)
{
using (System.Collections.Generic;)
{
using (System.Runtime.InteropServices;)
{

namespace Examples { class Program { STAThread;
//        static @void Main(string[] args) { SolidEdgeFramework.Application application = @null;
            SolidEdgeFramework.Documents documents = @null;
            SolidEdgeDraft.DraftDocument draftDocument = @null;
            SolidEdgeDraft.Sheet sheet = @null;
            SolidEdgeFrameworkSupport.TextBoxes textBoxes = @null;
            SolidEdgeFrameworkSupport.TextBox textBox = @null;

            try {; // See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic.OleMessageFilter.Register();

                // Attempt to connect to a running instance of Solid Edge.application = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
                documents = application.Documents;
                draftDocument = (SolidEdgeDraft.DraftDocument)documents.Add("SolidEdge.DraftDocument");
                sheet = draftDocument.ActiveSheet;
                textBoxes = (SolidEdgeFrameworkSupport.TextBoxes)sheet.TextBoxes;

                textBox = textBoxes.Add(0.1, 0.2, 0); };
            }
            catch (object System.Exception ex) {Console.WriteLine(ex);})
            {
            finally {OleMessageFilter.Unregister();}
            }
            }
            };
See Also

TextBoxes Collection  | TextBoxes Members