StructureEditor Namespace
GetProjectsForGivenItemID Method
The Item Id of which the projects to be returned.
The projects for given item ID.
Description
This API is used to get the projects for GivenItemID.
Syntax
Visual Basic
Public Function GetProjectsForGivenItemID( _
   ByVal bstrItemId As String, _
   ByRef pvarListOfProjects As Variant _
) As Long
Parameters
bstrItemId
The Item Id of which the projects to be returned.
pvarListOfProjects
The projects for given item ID.
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 aLisOfProject As Object = Nothing

        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 = "002262"

                objStructureEditor.GetProjectsForGivenItemID(strItemId, aLisOfProject)
            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