Solid Edge Report Etch for given model

2021-10-06T23:52:08Z
PART/SHEETMETAL

Summary


Details

How to get Etch count for given model



Solution


Imports System.IO


Imports System.Runtime.InteropServices


 


Module Module1


 


    Sub Main()


        Dim objApplication As SolidEdgeFramework.Application = Nothing


        Dim objSheetMetalDocument As SolidEdgePart.SheetMetalDocument = Nothing


        Dim objModels As SolidEdgePart.Models = Nothing


        Dim objModel1 As SolidEdgePart.Model = Nothing


        Dim objModel2 As SolidEdgePart.Model = Nothing


        Dim objEtches1 As SolidEdgePart.Etches = Nothing


        Dim objEtches2 As SolidEdgePart.Etches = Nothing


        Dim count As String = ""


 


        Try


            objApplication = Marshal.GetActiveObject("SolidEdge.Application")


            objSheetMetalDocument = objApplication.ActiveDocument


            objModels = objSheetMetalDocument.Models


 


            'Get etches for model 1


            objModel1 = objModels.Item(1)


            objEtches1 = objModel1.Etches


            count = objEtches1.Count.ToString()


            MsgBox(count)


 


            'Get etches for model 2


            objModel2 = objModels.Item(2)


            objEtches2 = objModel2.Etches


            count = objEtches1.Count.ToString()


            MsgBox(count)


 


        Catch ex As Exception


            Console.WriteLine(ex.Message)


        Finally


            Console.WriteLine("GTAC")


        End Try


 


    End Sub


End Module



Hardware/Software Configuration

Platform: INTL64
OS: window
OS Version: 764
Product: SOLID_EDGE
Application: AUTOMATION
Version: V108.0
Function: PART/SHEETMETAL

Ref: 001-9131141

KB Article ID# PL8004088

Contents

SummaryDetails

Associated Components

PART/SHEETMETAL: FLAT_PATTERN