Option Explicit
Sub Example()
Dim objApplication As SolidEdgeFramework.Application
Dim objTCE As SolidEdgeFramework.SolidEdgeTCE
'Example takes two dimensional array with two rows ( two documents) and 6 columns
Dim SmartCodesInfo(1, 5) As Object
'Example extracts return info for one row i.e. one document
Dim sSmartCode As String
Dim sRevision As String
Dim sContainerWiseXML As String
Dim sUngetXML As String
Set objApplication = GetObject(, "SolidEdge.Application")
Set objTCE = objApplication.SolidEdgeTCE
SmartCodesInfo(0, 0) = "Assign1" 'Input - Unique ID
SmartCodesInfo(0, 1) = "Item" 'Input - Item Type
SmartCodesInfo(0, 2) = Nothing 'Output ? Smart Code Number
SmartCodesInfo(0, 3) = Nothing 'Output - Revision
SmartCodesInfo(0, 4) = Nothing 'Output ? Container wise props in XML string
SmartCodesInfo(0, 5) = Nothing 'Output ? Unget info in XML string
SmartCodesInfo(1, 0) = "Assign2" 'Unique ID
SmartCodesInfo(1, 1) = "Item" 'Item Type
SmartCodesInfo(1, 2) = Nothing
SmartCodesInfo(1, 3) = Nothing
SmartCodesInfo(1, 4) = Nothing
SmartCodesInfo(1, 5) = Nothing
Call objTCE.GetSmartCodes(SmartCodesInfo)
sSmartCode = SmartCodesInfo(0, 2) 'Smart Code Number
sRevision = SmartCodesInfo(0, 3) 'Revision
sContainerWiseXML = SmartCodesInfo(0, 4) 'Containerwise property XML string
sUngetXML = SmartCodesInfo(0, 5) 'Ungetinfo XML string
If Not objApplication Is Nothing Then
Call objApplication.Quit
End If
Set objTCE = Nothing
Set objApplication = Nothing
End Sub