Solid Edge Framework Type Library
DoesTeamCenterFileExistsUsingKeyProperties Method
Specify the item-type of the item.
It is a two-dimensional array which will take Key Properties and their values as input.
Specify the item-rev of the item.
This parameter will indicate the existence of file.
o True – If file exists
o False – File does not exists
Description
Checkes whether the FileExists on the server. Extended for MFK
Syntax
Visual Basic
Public Sub DoesTeamCenterFileExistsUsingKeyProperties( _
   ByVal bstrItemType As String, _
   ByRef pvarMFKAttrInfo As Variant, _
   ByVal bstrItemRev As String, _
   ByRef bFileExists As Boolean _
) 
Parameters
bstrItemType
Specify the item-type of the item.
pvarMFKAttrInfo
It is a two-dimensional array which will take Key Properties and their values as input.
bstrItemRev
Specify the item-rev of the item.
bFileExists
This parameter will indicate the existence of file.
o True – If file exists
o False – File does not exists
Example
Imports System.Runtime.InteropServices

Public Class Form1

    Private Sub DoesTeamCenterFileExistsUsingKeyProperties_Click(sender As Object, e As EventArgs) Handles DoesTeamCenterFileExistsUsingKeyProperties.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(1, 1) As Object
        MFKAttributes(0, 0) = "item_id"
        MFKAttributes(0, 1) = "001960"
        MFKAttributes(1, 0) = "object_type"
        MFKAttributes(1, 1) = "MFK2Item1"

        Dim ItemRevision As String = "B"
        Dim ItemType As String = "MFK2Item1"
        Dim bIsFileExists As Boolean

        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.DoesTeamCenterFileExistsUsingKeyProperties(ItemType, MFKAttributes, ItemRevision, bIsFileExists)


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

SolidEdgeTCE Object  | SolidEdgeTCE Members