Solid Edge Part Type Library
SetActiveSetting Method
Description
Set various settings options on a study owner.
Syntax
Visual Basic
Public Sub SetActiveSetting( _
   ByVal bstrSettingName As String _
) 
Parameters
bstrSettingName
Remarks
Similar to assembly configurations we can have different display settings for a document. These settings will be applicable to all studies. A display setting contains the states of various post processing controls like color bar position, spectrum type. A specific setting can be made active by sending its name as below.
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPartDocument As SolidEdgePart.PartDocument = Nothing
        Dim objStudyOwner As SolidEdgePart.StudyOwner = Nothing
        Dim strSettingName As String = "Mysetting" 'setting name.

        Try
            OleMessageFilter.Register()

            ' Connect to Solid Edge
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objPartDocument = objApplication.ActiveDocument

            objStudyOwner = objPartDocument.StudyOwner
            objStudyOwner.SetActiveSetting(strSettingName)

        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

StudyOwner Collection  | StudyOwner Members  | Solid Edge ST3 - What's New