Solid Edge Revision Manager Object Library
Occurrences Property
Description
This read-only Long property returns the number of occurrences (subassemblies or parts) for the referenced Document object.
Property type
Read-write property
Syntax
Visual Basic
Public Property Occurrences As Integer
Remarks
This property is only valid for parts and subassemblies. Other references (for example, links to spreadsheets), return a separate document for each reference (even if the reference to the same file or cell in a spreadsheet) with Occurrences equal to 1.
Example
Imports RevisionManager
Imports System.Runtime.InteropServices

Module Example

    Sub Main()
        Dim objApplication As RevisionManager.Application = Nothing
        Dim objDocument As RevisionManager.Document = Nothing
        Dim iOccurrences As Integer

        Try
            ' Start Revision Manager.
            objApplication = New RevisionManager.Application
            objDocument = objApplication.Open("C:\Part1.par")
            iOccurrences = objDocument.Occurrences

        Catch ex As Exception
            ' Write any errors to console.
            Console.WriteLine(ex.Message)
        Finally
            ' Release COM Objects.
            If Not (objDocument Is Nothing) Then
                Marshal.ReleaseComObject(objDocument)
                objDocument = Nothing
            End If
            If Not (objApplication Is Nothing) Then
                objApplication.Quit()
                Marshal.ReleaseComObject(objApplication)
                objApplication = Nothing
            End If
        End Try
    End Sub

End Module
See Also

IDocAuto Object  | IDocAuto Members