Reply

Missing Constant for Curvers in BaseStyleConstants

[ Edited ]

Hello,

 

I want to get (and later set) the BaseStyles for my files. Everything works fine expect for curve styles. It seems that there is no eg. AssemblyBaseStyleConstant for Curves. Here is a snippet from my code:

 

    Public Sub UpdateFaceStyles()

        Dim sourceStyles As SolidEdgeFramework.FaceStyles = Nothing
        Dim destStyles As SolidEdgeFramework.FaceStyles = Nothing
        Dim style As SolidEdgeFramework.FaceStyle = Nothing

        Dim listStyles As List(Of String) = New List(Of String)

        Select Case _destfile.Type
            Case DocumentTypeConstants.igAssemblyDocument, DocumentTypeConstants.igSyncAssemblyDocument
                'Find styles in use
                Dim asm As SolidEdgeAssembly.AssemblyDocument = DirectCast(_destfile, SolidEdgeAssembly.AssemblyDocument)
                asm.GetBaseStyle(SolidEdgeAssembly.AssemblyBaseStylesConstants.seAssemblyConstructionStyle, style)
                If Not style Is Nothing Then listStyles.Add(style.StyleName)
                asm.GetBaseStyle(SolidEdgeAssembly.AssemblyBaseStylesConstants.seAssemblyWeldBeadStyle, style)
                If Not style Is Nothing Then listStyles.Add(style.StyleName)
                listStyles.AddRange(lstFaceStyles)

                'Clear not used styles
                destStyles = CType(asm.FaceStyles, FaceStyles)
                For Each style In destStyles
                    If Not listStyles.Contains(style.StyleName) Then
                        Try
                            style.Delete()
                        Catch ex As Exception
                            'Style wird benutzt?
                        End Try
                    End If
                Next style

                'Copy new styles to file
                asm.ImportStyles(_sourcefile.FullName, True)


I am using nuget package Interop.SolidEdge (107.0.1.0). Can this be fixed there or is it related to SolidEdge (V107)?

Greetings from Germany
Christian Kunkel
https://c-k-m.info