Solid Edge Rename Sheet And Background Sheet

2021-10-06T23:55:11Z
PART/SHEETMETAL

Summary


Details

--------------- 
Rename Sheet And Background Sheet



Solution

 Imports System.IO 
Imports System.Runtime.InteropServices 
Imports SolidEdge.Constant.Interop


Module RenameSheetAndBackgroundSheet 
 Sub Main()


 Dim objApplication As SolidEdge.Framework.Interop.Application = Nothing 
 Dim objDraftDoc As SolidEdge.Draft.Interop.DraftDocument = Nothing 
 Dim objSheets As SolidEdge.Draft.Interop.Sheets = Nothing 
 Dim objSections As SolidEdge.Draft.Interop.Sections = Nothing 
 Dim obj2dModelSheet As SolidEdge.Draft.Interop.Sheet = Nothing 
 Dim objType As Type = Nothing


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


 If objApplication Is Nothing Then 
 objType = Type.GetTypeFromProgID("SolidEdge.Application") 
 objApplication = Activator.CreateInstance(objType) 
 objApplication.Visible = True 
 End If


 objDraftDoc = objApplication.ActiveDocument 
 objSheets = objDraftDoc.Sheets


 objSheets.Rename("Sheet1", "GTAC") 
 objSheets.Rename("A4-Sheet", "Test")


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


 End Sub 
End Module



Notes and References


Hardware/Software Configuration

Platform: INTL64
OS: window
OS Version: 764
Product: SOLID_EDGE
Application: AUTOMATION
Version: V109MP5
Function: API_DOCUMENT
Product: SOLID_EDGE
Application: AUTOMATION
Version: V109MP5
Function: API_DOCUMENT

Ref: 002-7009758

KB Article ID# PL7009758

Contents

SummaryDetails

Associated Components

PART/SHEETMETAL: FEATURES