Solid Edge Framework Type Library
GetSmartCodes Method
This is two dimensional array. Each row contains data per document. Each column will contain in and out information.
Description
Gets Smart Codes from server
Syntax
Visual Basic
Public Sub GetSmartCodes( _
   ByRef pvarSmartCodesInfo As Variant _
) 
Parameters
pvarSmartCodesInfo
This is two dimensional array. Each row contains data per document. Each column will contain in and out information.
Remarks

ST2 provides smart code support. This API will return smart codes information such as Smart Code Number, revision, container wise properties in XML string format required for field set and unget information in XML string format required for resetting assigned smart codes. Caller should provide unique ID (it can be document name) and item type to this API. This API will show smart code dialog.

Caller should create two dimensional array with 6 columns otherwise API fails with invalid argument.
Example
Private Sub Command1_Click()
    On Error Resume Next
    Dim objApplication As SolidEdgeFramework.Application
    Dim objSolidEdgeInsightXT  As SolidEdgeFramework.SolidEdgeInsightXT
    
    Set objApplication = GetObject(, "SolidEdge.Application")
    Set objSolidEdgeInsightXT = objApplication.SolidEdgeInsightXT

    'Example takes two dimensional array with two rows ( two documents) and 6 columns
    Dim SmartCodesInfo(1, 5) As Object
    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 objSolidEdgeInsightXT.GetSmartCodes(SmartCodesInfo)
    
    '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
    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

    Set objSolidEdgeInsightXT = Nothing
    Set objApplication = Nothing
End Sub
See Also

SolidEdgeInsightXT Object  | SolidEdgeInsightXT Members  | Solid Edge ST4 - What's New