Solid Edge How to create specific type of document

2021-10-06T23:52:07Z
Design

Summary


Details

User want to crete all types of document in Solid Edge by Add() method.

Solution

Imports System.IO


Imports System.Runtime.InteropServices


 


Module Module1


 


    Sub Main()


        Dim objApplication As SolidEdgeFramework.Application = Nothing


        Dim objDocument As SolidEdgeFramework.Documents = Nothing


       


        Try


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


            objDocument = objApplication.Documents


 


            ' Get the documents collection.


            objDocument = objApplication.Documents


 


            ' Create a new assembly document.


            objDocument.Add("SolidEdge.AssemblyDocument")


 


            ' Create a new draft document.


            objDocument.Add("SolidEdge.DraftDocument")


 


            ' Create a new part document.


            objDocument.Add("SolidEdge.PartDocument")


 


            ' Create a new sheetmetal document.


            objDocument.Add("SolidEdge.SheetMetalDocument")


 


        Catch ex As Exception


            Console.WriteLine(ex.Message)


        Finally


            Console.WriteLine("GTAC")


        End Try


    End Sub


End Module





Hardware/Software Configuration

Platform: AMD64
OS: window
OS Version: 764
Product: SOLID_EDGE
Application: AUTOMATION
Version: V108.0
Function: CUSTOM_SAMPLES

Ref: 002-8001928

KB Article ID# PL8001928

Contents

SummaryDetails

Associated Components

Part Modeling