Quantcast
Channel: NX Journaling - Journaling / NXOpen API
Viewing all articles
Browse latest Browse all 783

Below Journal work fine but it is not deleting the table in layer 256

$
0
0

Option Strict Off
Imports System
Imports NXOpen

Module Module16

Sub Main()

Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display

'layer number to delete objects from
Const layerToDelete As Integer = 256

If displayPart Is Nothing Then
'no part to work on
Exit Sub
End If

Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Delete")

Dim notifyOnDelete1 As Boolean
notifyOnDelete1 = theSession.Preferences.Modeling.NotifyOnDelete

theSession.UpdateManager.ClearErrorList()

Dim V As Integer
V = theSession.UpdateManager.AddToDeleteList(workPart.Layers.GetAllObjectsOnLayer(layerToDelete))

Dim P As Integer
P = theSession.UpdateManager.DoUpdate(markId1)

End Sub
End Module


Viewing all articles
Browse latest Browse all 783

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>