Solid Edge Framework Type Library
GetListOfFilesFromTeamcenterServerUsingKeyProperties Method
It is a two-dimensional array which will take Key Properties and their values as input.
 Specify the item-revision.
Specify the item-type.
Returns the list of files under the item matching the key properties.
Number of files present on server under the Item matching the key properties.
Description
Get the list of files from Teamcenter Server, matching for the given set of Key Properties.
Syntax
Visual Basic
Public Sub GetListOfFilesFromTeamcenterServerUsingKeyProperties( _
   ByRef pvarMFKAttrInfo As Variant, _
   ByVal bstrDirctFileItemRevId As String, _
   ByVal bstrItemType As String, _
   ByRef vFileNames As Variant, _
   ByRef nFiles As Long _
) 
Parameters
pvarMFKAttrInfo
It is a two-dimensional array which will take Key Properties and their values as input.
bstrDirctFileItemRevId
 Specify the item-revision.
bstrItemType
Specify the item-type.
vFileNames
Returns the list of files under the item matching the key properties.
nFiles
Number of files present on server under the Item matching the key properties.
Example
Imports System.Runtime.InteropServices

Public Class Form1
    
    Private Sub GetListOfFilesFromTeamcenterServerUsingKeyProperties_Click(sender As Object, e As EventArgs) Handles GetListOfFilesFromTeamcenterServerUsingKeyProperties.Click
        Dim objSEApplication As SolidEdgeFramework.Application = Nothing
        Dim objTCE As SolidEdgeFramework.SolidEdgeTCE = Nothing
        Dim majorVersion As Object = Nothing
        Dim completeVersion As Object = Nothing
        Dim UserName As String
        Dim Password As String
        Dim Group As String
        Dim Role As String
        Dim URL As String
        Dim bTeamCenterMode As Boolean
        Dim MFKAttributes(2, 1) As Object
        MFKAttributes(0, 0) = "item_id"
        MFKAttributes(0, 1) = "001410"
        MFKAttributes(1, 0) = "object_type"
        MFKAttributes(1, 1) = "MFK9Item12"
        MFKAttributes(2, 0) = "mfk9attribute1"
        MFKAttributes(2, 1) = "hhhh"

        Dim ItemTypeMFK As Object
        ItemTypeMFK = "MFK9Item12"

        Dim FileItemRevID As String = "B"

        Dim vFileNames As Object = Nothing
        Dim nFiles As Integer


        Try
            objSEApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objSEApplication.DisplayAlerts = False

            objTCE = objSEApplication.SolidEdgeTCE
            Call objTCE.GetTeamCenterMode(bTeamCenterMode)
            If bTeamCenterMode = False Then
                objTCE.SetTeamCenterMode(True)
            End If
            'Specify Server Credentials
            UserName = "abc"
            Password = "abc"
            Group = ""
            Role = ""
            URL = "http://Servername:8085/tc"

            Call objTCE.ValidateLogin(UserName, Password, Group, Role, URL)
            objTCE.GetListOfFilesFromTeamcenterServerUsingKeyProperties(MFKAttributes, FileItemRevID, ItemTypeMFK, vFileNames, nFiles)
            MsgBox(nFiles.ToString)

        Catch ex As Exception
            MsgBox(ex.ToString)
            Clipboard.SetText(ex.ToString)
        End Try
    End Sub
End Class
See Also

SolidEdgeTCE Object  | SolidEdgeTCE Members