Solid Edge Draft Type Library
ImportStyles2 Method
If bReplace is False, only styles that do not already exist will be copied.
Path of the source document.
Description
Copies styles of the specified type from the specified document. If bReplace is False, only styles that do not already exist will be copied.
Syntax
Visual Basic
Public Sub ImportStyles2( _
   ByVal StyleType As seStyleTypeConstants, _
   ByVal bReplace As Boolean, _
   ByVal pSrcDocument As Object _
) 
Parameters
StyleType
ValueDescription
igDimensionStyleDimension style.
igDrawingViewStyleDrawing view style.
igFillStyleFill style.
igHatchStyleHatch style.
igLineStyleLine style.
igTableStyleTable style.
igTextStyleText style.
bReplace
If bReplace is False, only styles that do not already exist will be copied.
pSrcDocument
Path of the source document.
Example
Private Sub btnImportStyles_Click(sender As System.Object, e As System.EventArgs) Handles btnImportStyles.Click
    Dim objApplication As SolidEdgeFramework.Application = Nothing
    Dim objDraftDoc As SolidEdgeDraft.DraftDocument = Nothing
    Dim objDoc2 As SolidEdgeDraft.DraftDocument
    Dim objType As Type = Nothing

    Try
        objApplication = GetObject(, "SolidEdge.Application")

        If objApplication Is Nothing Then
            ' Get the type from the Solid Edge ProgID
            objType = Type.GetTypeFromProgID("SolidEdge.Application")
            ' Start Solid Edge
            objApplication = Activator.CreateInstance(objType)
            ' Make Solid Edge visible
            objApplication.Visible = True
        End If

        objDraftDoc = objApplication.ActiveDocument

        objDoc2 = objApplication.Documents.Open("C:\Program Files (x86)\Solid Edge ST6\Training\stddb3d.dft")

        Call objDraftDoc.ImportStyles2(SolidEdgeFramework.seStyleTypeConstants.igDimensionStyle, False, objDoc2)
        Call objDraftDoc.ImportStyles2(SolidEdgeFramework.seStyleTypeConstants.igLineStyle, False, objDoc2)
        Call objDraftDoc.ImportStyles2(SolidEdgeFramework.seStyleTypeConstants.igTableStyle, True, objDoc2)
        Call objDraftDoc.ImportStyles2(SolidEdgeFramework.seStyleTypeConstants.igFillStyle, True, objDoc2)
        Call objDraftDoc.ImportStyles2(SolidEdgeFramework.seStyleTypeConstants.igHatchStyle, True, objDoc2)
        Call objDraftDoc.ImportStyles2(SolidEdgeFramework.seStyleTypeConstants.igDrawingViewStyle, True, objDoc2)
        Call objDraftDoc.ImportStyles2(SolidEdgeFramework.seStyleTypeConstants.igTextStyle, True, objDoc2)

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

End Sub
See Also

DraftDocument Object  | DraftDocument Members