Solid Edge Framework Type Library
UnGetSmartCodes Method
Array of unget XML strings for which unget is to be done.
Description
Resets Assigned Smart Codes on server
Syntax
Visual Basic
Public Sub UnGetSmartCodes( _
   ByRef ppsaUnGetInfo() As Variant _
) 
Parameters
ppsaUnGetInfo
Array of unget XML strings for which unget is to be done.
Remarks
This API will unget assigned Smart Code number if not being used. The GetSmartCodes API returns unget information per document. The caller should pass this string for unget.
Example
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
    Dim ObjUnGetInfo(0) As Variant

    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

    ObjUnGetInfo(0) = sUngetXML
    
    Call objTCE.UnGetSmartCodes(ObjUnGetInfo)

    If Not objApplication Is Nothing Then
        Call objApplication.Quit
    End If
    
    Set objTCE = Nothing
    Set objApplication = Nothing
End Sub
See Also

SolidEdgeTCE Object  | SolidEdgeTCE Members  | Solid Edge ST2 - What's New