StructureEditor Namespace
AddExistingItem Method
The Item Id into which the item will be added.
The revision of Item into which the item will be added.
The File name of the item into which the item will be added.
The Item Id of the item to be added.
The Item Revision of the item to be added.
The File name of the item to be added.
The revision rule used for opening the document.
Description
This API is used to add the given Item into specified item.
Syntax
Visual Basic
Public Function AddExistingItem( _
   ByVal szItemId As String, _
   ByVal szItemRev As String, _
   ByVal szDataSetFileName As String, _
   ByVal szItemIdToBeAdded As String, _
   ByVal szItemRevToBeAdded As String, _
   ByVal szDataSetFileNameToBeAdded As String, _
   ByVal szRevisionRule As String _
) As Long
Parameters
szItemId
The Item Id into which the item will be added.
szItemRev
The revision of Item into which the item will be added.
szDataSetFileName
The File name of the item into which the item will be added.
szItemIdToBeAdded
The Item Id of the item to be added.
szItemRevToBeAdded
The Item Revision of the item to be added.
szDataSetFileNameToBeAdded
The File name of the item to be added.
szRevisionRule
The revision rule used for opening the document.
Remarks
Call this API after calling open () API. Because for calling this API a solid edge file or an empty item into which the item will be added needs to be opened in the structure editor application. If the action is set without opening a solid edge file in the application then nothing will happen. If user wants to add multiple files then the above code needs to be called multiple times.
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As StructureEditor.Application = Nothing
        Dim objStructureEditor As StructureEditor.SEECStructureEditor = Nothing
        Dim strUserName As String
        Dim strPassword As String
        Dim strGroup As String
        Dim strRole As String
        Dim strURL As String
        Dim strItemId As String
        Dim strItemRev As String
        Dim strFileName As String
        Dim strRevisionRule As String
        Dim strFolderName As String
        Dim strItemIdToBeAdded As String
        Dim strItemRevToBeAdded As String
        Dim strFileNameToBeAdded As String

        Try
            OleMessageFilter.Register()

            ' Start structure editor application
            objApplication = Activator.CreateInstance(Type.GetTypeFromProgID("StructureEditor.Application"))
            objStructureEditor = objApplication.SEECStructureEditor
            objApplication.Visible = True

            strUserName = "Username"
            strPassword = ""
            strGroup = ""
            strRole = ""
            strURL = "http://Servername:8085/tc"

            If objStructureEditor.ValidateLogin(strUserName, strPassword, strGroup, strRole, strURL) = 0 Then
                strItemId = "012186"
                strItemRev = "A"
                strFileName = "012186.asm"
                strRevisionRule = "Latest Working"
                strFolderName = ""

                If objStructureEditor.Open(strItemId, strItemRev, strFileName, strRevisionRule, strFolderName) = 0 Then
                    strFileNameToBeAdded = "011854.par"
                    strItemIdToBeAdded = "011854"
                    strItemRevToBeAdded = "A"
                    objStructureEditor.AddExistingItem(strItemId, strItemRev, strFileName, strItemIdToBeAdded, strItemRevToBeAdded, strFileNameToBeAdded, strRevisionRule)
                End If
            End If
        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            If Not objApplication Is Nothing Then
                ' Kill the instance of structure editor created
                objApplication.Quit()
            End If

            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

ISEECStructureEditor Object  | ISEECStructureEditor Members  | Solid Edge ST3 - What's New