Option Explicit
Sub Example()
Dim objApplication As SolidEdgeFramework.Application
Dim objTCE As SolidEdgeFramework.SolidEdgeTCE
Dim ItemRevIds As Variant
Dim nCount As Long
Dim iIndex As Integer
Dim seTypes As TCESETypes
Dim strUserName As String
Set objApplication = GetObject(, "SolidEdge.Application")
Set objTCE = objApplication.SolidEdgeTCE
seTypes = TCE_SEAssembly
strUserName = "User"
nCount = 0
'Provide empty user name if you want to search in whole database
Call objTCE.GetItemRevBasedOnSEType(seTypes, strUserName, ItemRevIds)
If Not IsEmpty(ItemRevIds) Then
nCount = UBound(ItemRevIds)
For iIndex = 0 To nCount
'ItemRevIds(iIndex, 0) = Item ID whose dataset type equal to the input type (TCE_SEAssembly)
'ItemRevIds(iIndex, 1) = Revision ID whose dataset type equal to the input type (TCE_SEAssembly)
Next
End If
If Not objApplication Is Nothing Then
Call objApplication.Quit
End If
Set objTCE = Nothing
Set objApplication = Nothing
End Sub