Solid Edge Framework Type Library
CheckOutDocumentsFromTeamCenterServerUsingKeyProperties Method
It is a two-dimensional array which takes Key Properties and their values as input.
Specify the item-type of the item.
Specify the item-rev of the item.
It has following possible values:
o TRUE – In case where it is required to only download the given item from the Teamcenter database but don’t want to check it out.
o FALSE – In case where it is required to both download as well as checkout.
Name of the file to be checked out.
Specify the download level.
Description
Checkout the File from the server using MFKAttributes as input
Syntax
Visual Basic
Public Sub CheckOutDocumentsFromTeamCenterServerUsingKeyProperties( _
   ByRef pvarMFKAttrInfo As Variant, _
   ByVal bstrItemType As String, _
   ByVal bstrDirctFileItemRevId As String, _
   ByVal bOnlyDownload As Boolean, _
   Optional ByVal bstrFilename As String, _
   Optional ByVal enumDownloadLevel As DocumentDownloadLevel = SEECDownloadAllLevel _
) 
Parameters
pvarMFKAttrInfo
It is a two-dimensional array which takes Key Properties and their values as input.
bstrItemType
Specify the item-type of the item.
bstrDirctFileItemRevId
Specify the item-rev of the item.
bOnlyDownload
It has following possible values:
o TRUE – In case where it is required to only download the given item from the Teamcenter database but don’t want to check it out.
o FALSE – In case where it is required to both download as well as checkout.
bstrFilename
Name of the file to be checked out.
enumDownloadLevel
ValueDescription
SEECDownloadAllLevel
SEECDownloadFirstLevel
SEECDownloadTopLevel
Specify the download level.
Example
Imports System.Runtime.InteropServices

Public Class Form1

    Private Sub CheckOutDocumentsFromTeamCenterServerUsingKeyProperties_Click(sender As Object, e As EventArgs) Handles CheckOutDocumentsFromTeamCenterServerUsingKeyProperties.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 ItemType As String = "MFK2Item1"
        Dim bOnlyDownload As Boolean = True
        Dim ItemRevision As String = "A"

        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.CheckOutDocumentsFromTeamCenterServerUsingKeyProperties(MFKAttributes, ItemType, ItemRevision, bOnlyDownload)


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

SolidEdgeTCE Object  | SolidEdgeTCE Members