Solid Edge How to delete Image2d object in Solid Edge using API?

2024-01-25T02:50:15Z
DRAFT

Summary


Details

How to delete Image2d object in Solid Edge using API?

Solution

Customer can use ActiveSelectSet.Delete() method to delete Image2d object.

Sample code looks like,

Dim objApplication As SolidEdge.Framework.Interop.Application = Nothing

Dim objDraftDoc As SolidEdge.Draft.Interop.DraftDocument = Nothing

Dim objSheet As SolidEdge.Draft.Interop.Sheet = Nothing

Dim Image2d As SolidEdge.FrameworkSupport.Interop.Image2d = Nothing

Try

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

objDraftDoc = objApplication.ActiveDocument

objSheet = objDraftDoc.ActiveSheet

For Each objimage As SolidEdge.FrameworkSupport.Interop.Image2d In objSheet.Images2d

objApplication.ActiveSelectSet.Add(objimage)

Next

objApplication.ActiveSelectSet.Delete()

Catch ex As Exception

MsgBox(ex.ToString)

End Try

KB Article ID# PL8769480

Contents

SummaryDetails

Associated Components

DRAFT: ANNOTATIONS/DIMENSIONS DRAFT: CRASHLOG DRAFT: DRAWING_VIEWS DRAFT: FILE DRAFT: OTHER