Solid Edge Assembly Type Library
GetBaseStyle Method
Member of PartBaseStylesConstants that specifies the base style for the referenced object.
Specifies base style characteristics, such as color and lighting, for the referenced object.
Description
This method gets the base style for the referenced document object.
Syntax
Visual Basic
Public Sub GetBaseStyle( _
   ByVal BaseStyleType As AssemblyBaseStylesConstants, _
   ByRef BaseStyle As FaceStyle _
) 
Parameters
BaseStyleType
ValueDescription
seAssemblyConstructionStyleControls the style of assembly construction.
seAssemblyCurveStyleControls the default style of assembly level curves.
seAssemblyThreadedCylindersStyleControls the default style of assembly level threads.
seAssemblyWeldBeadStyleControls the style of assembly weld bead.
Member of PartBaseStylesConstants that specifies the base style for the referenced object.
BaseStyle
Specifies base style characteristics, such as color and lighting, for the referenced object.
Example
Option Infer On

Imports System
Imports System.Runtime.InteropServices

Namespace Examples
    Friend Class Program
        <STAThread>
        Shared Sub Main(ByVal args() As String)
            Dim application As SolidEdgeFramework.Application = Nothing
            Dim assemblyDocument As SolidEdgeAssembly.AssemblyDocument = Nothing
            Dim BaseStyle As SolidEdgeFramework.FaceStyle = Nothing

            Try
                ' See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic.
                OleMessageFilter.Register()

                ' Attempt to connect to a running instance of Solid Edge.
                application = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application)
                assemblyDocument = CType(application.ActiveDocument, SolidEdgeAssembly.AssemblyDocument)

                If assemblyDocument IsNot Nothing Then
                    Dim BaseStyleType = SolidEdgeAssembly.AssemblyBaseStylesConstants.seAssemblyThreadedCylindersStyle

                    assemblyDocument.GetBaseStyle(BaseStyleType, BaseStyle)
                End If
            Catch ex As System.Exception
                Console.WriteLine(ex)
            Finally
                OleMessageFilter.Unregister()
            End Try
        End Sub
    End Class
End Namespace
using System;
using System.Runtime.InteropServices;

namespace Examples
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            SolidEdgeFramework.Application application = null;
            SolidEdgeAssembly.AssemblyDocument assemblyDocument = null;
            SolidEdgeFramework.FaceStyle BaseStyle = null;

            try
            {
                // See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic.
                OleMessageFilter.Register();

                // Attempt to connect to a running instance of Solid Edge.
                application = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
                assemblyDocument = (SolidEdgeAssembly.AssemblyDocument)application.ActiveDocument;

                if (assemblyDocument != null)
                {
                    var BaseStyleType = SolidEdgeAssembly.AssemblyBaseStylesConstants.seAssemblyThreadedCylindersStyle;

                    assemblyDocument.GetBaseStyle(BaseStyleType, out BaseStyle);
                }
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
            finally
            {
                OleMessageFilter.Unregister();
            }
        }
    }
}
See Also

AssemblyDocument Object  | AssemblyDocument Members  | Solid Edge V18 - What's New