Solid Edge Framework Type Library
Active Property
Description
Determines the active state of the theme.
Property type
Read-only property
Syntax
Visual Basic
Public Property Active As Boolean
Example
Imports System.Runtime.InteropServices
Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim objApp As SolidEdgeFramework.Application
        Dim objDoc As SolidEdgePart.PartDocument
        Dim result As Boolean
        Dim activeCount As Integer = 0

        Try
            ' Set up the application document
            objApp = Marshal.GetActiveObject("SolidEdge.Application")
            objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
            objApp.Visible = True

            ' Generate a new CustomiZationHelper variable
            Dim h As CustomizationHelper = New CustomizationHelper(objApp)
            ' Loop through all existing themes, activate them one by one and then
            ' Check to make sure they were properly activated. 
            For Each t As SolidEdgeFramework.RibbonBarTheme In h.themes
                activeCount = 0
                h.themes.ActivateTheme(t)
                result = t.Active
                For Each u As SolidEdgeFramework.RibbonBarTheme In h.themes
                    If Not (u.Equals(t)) Then
                        If u.Active Then
                            activeCount += 1
                        End If
                    End If
                Next u
                If activeCount > 0 Then
                    result = False
                Else
                    result = True
                End If
            Next t
            ' Release objects
            objApp = Nothing
            objDoc = Nothing

        Catch ex As Exception
            MsgBox(ex.ToString)
            Clipboard.SetText(ex.ToString)
        End Try

    End Sub
End Class
See Also

RibbonBarTheme Object  | RibbonBarTheme Members