StructureEditor Namespace
RemoveItem Method
The parent Item Id from which the item will be removed.
The parent Item revision from which the item will be removed.
The parent File name of the item from which the item will be removed.
The Item Id of the item to be removed.
The Item Revision of the item to be removed.
The File name of the item to be removed.
Description
This API is used to remove the given Item from specified item.
Syntax
Visual Basic
Public Function RemoveItem( _
   ByVal szPrntItemId As String, _
   ByVal szPrntItemRev As String, _
   ByVal szPrntDataSetFileName As String, _
   ByVal szItemIdToBeRemoved As String, _
   ByVal szTgtItemRevToBeRemoved As String, _
   ByVal szTgtDataSetFileNameToBeRemoved As String _
) As Long
Parameters
szPrntItemId
The parent Item Id from which the item will be removed.
szPrntItemRev
The parent Item revision from which the item will be removed.
szPrntDataSetFileName
The parent File name of the item from which the item will be removed.
szItemIdToBeRemoved
The Item Id of the item to be removed.
szTgtItemRevToBeRemoved
The Item Revision of the item to be removed.
szTgtDataSetFileNameToBeRemoved
The File name of the item to be removed.
Remarks
Call this API after calling open () API. Because for calling this API a solid edge file or an empty item from which the item will be removed needs to be opened in the structure editor application. If the action is set without opening the parent solid edge file in the application then nothing will happen. If user wants to remove different items from the parent item then the above code needs to be called multiple times. If parent contains multiple occurrences of the same item then setting remove action on single item will set remove action on all the occurrences within parent.
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 strPrntItemId As String
        Dim strPrntItemRev As String
        Dim strPrntFileName As String
        Dim strRevisionRule As String
        Dim strFolderName As String
        Dim strItemIdToBeRemoved As String
        Dim strItemRevToBeRemoved As String
        Dim strFileNameToBeRemoved 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
                strPrntItemId = "012186"
                strPrntItemRev = "A"
                strPrntFileName = "012186.asm"
                strRevisionRule = "Latest Working"
                strFolderName = ""

                If objStructureEditor.Open(strPrntItemId, strPrntItemRev, strPrntFileName, strRevisionRule, strFolderName) = 0 Then
                    strItemIdToBeRemoved = "011854"
                    strItemRevToBeRemoved = "A"
                    strFileNameToBeRemoved = "011854.par"
                    objStructureEditor.RemoveItem(strPrntItemId, _
                                                  strPrntItemRev, _
                                                  strPrntFileName, _
                                                  strItemIdToBeRemoved, _
                                                  strItemRevToBeRemoved, _
                                                  strFileNameToBeRemoved)
                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