StructureEditor Namespace
AssignAll Method
Description
This API is used to automatically assign system generated values to the mandatory properties of a document like item id,item revision,item name and dataset name.
Syntax
Visual Basic
Public Function AssignAll() As Long
Remarks
Call this API after setting either save as or revise action on the file. Because before calling this API action needs to be set on the file. If no action is set on the solid edge file and AssignAll is called then values will not be assigned as there is no file selected and no action is set on the file. There are two cases when this API can be used. Save as: If this API is called after save as action is selected then values will be assigned to Item id, item revision, item name and dataset name. Revise: If this API is called after revise action is selected then value will be assigned to Revision and dataset name.
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As StructureEditor.Application = Nothing
        Dim objStructureEditor As StructureEditor.SEECStructureEditor = Nothing
        Dim strItemId As String
        Dim strItemRev As String
        Dim strFileName As String
        Dim strRevisionRule As String
        Dim strFolderName As String

        Try
            OleMessageFilter.Register()

            ' Start structure editor application
            objApplication = Activator.CreateInstance(Type.GetTypeFromProgID("StructureEditor.Application"))
            objStructureEditor = objApplication.SEECStructureEditor
            objApplication.Visible = True

            strItemId = "081691"
            strItemRev = "A"
            strFileName = "a.asm"
            strRevisionRule = "Latest Working"
            strFolderName = ""

            If objStructureEditor.Open(strItemId, strItemRev, strFileName, strRevisionRule, strFolderName) = 0 Then
                If objStructureEditor.SetReviseSelected(strItemId, strItemRev, strFileName) = 0 Then
                    objStructureEditor.AssignAll()
                End If
            End If
        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            If Not objApplication Is Nothing Then
                ' Kill the instance of structure editor created
                objApplication.Quit()
            End If

            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

ISEECStructureEditor Object  | ISEECStructureEditor Members